#include "iostream.h"
int main()
{
    float r,l;
    const float pi=3.1415926f;
    cout<&lt;"请输入半径";
    cin>&gt;r;
    l=2*pi*r;
    cout<&lt;"元的周长为"&lt;&lt;l&lt;&lt;endl;
    return 0;


}

 

 

#include "iostream.h"
int main()
{
    int a,b;
    cin>&gt;a&gt;&gt;b;
    if (a<b)
    {
        int temp;
        temp=b;b=a;a=temp;
        }
    cout&lt;&lt;a&lt;&lt;">"<&lt;b;
    return 0;
}

 

#include "iostream.h"
int main()
{
    int a,b,max;
    cin>&gt;a&gt;&gt;b;
    if (a&gt;=b)
    {
        max=a;
    }
    else
    {
        max=b;
    }
    cout<&lt;max&lt;&lt;endl;
    return 0;
}

 

#include "iostream.h"
int main()
{
    float a,b;
    char oper;
    cin>&gt;a&gt;&gt;oper&gt;&gt;b;
    if (oper=='+')
    {
        cout<&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;"="&lt;&lt;a+b&lt;&lt;endl;
    }
    else
    {
        if (oper=='-')
        {
            cout&lt;&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;"="&lt;&lt;a-b&lt;&lt;endl;
        }
        else
        {
            if (oper=='*')
            {
                cout&lt;&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;"="&lt;&lt;a*b&lt;&lt;endl;
            }
            else
            {
                if (oper=='/' && b!=0)
                {
                    cout&lt;&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;"="&lt;&lt;a/b&lt;&lt;endl;
                }
                else
                {
                    cout&lt;&lt;"error"&lt;&lt;endl;
                }
            }
        }
    }
    return 0;

}

 

 

 

#include "iostream.h"
int main()
{
    float a,b;
    char oper;
    cout&lt;&lt;"请输入一个表达式"&lt;&lt;endl;
    cin>&gt;a&gt;&gt;oper&gt;&gt;b;
    switch(oper)
    {
    case '+':
        {
        cout<&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;'='&lt;&lt;a+b&lt;&lt;endl;
        break;
        }
    case'-':
        {
            cout&lt;&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;'='&lt;&lt;a-b&lt;&lt;endl;
            break;
        }
    case '*':
        {
            cout&lt;&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;'='&lt;&lt;a*b&lt;&lt;endl;
            break;
        }
    case '/':
        {
            if (b!=0)
                cout&lt;&lt;a&lt;&lt;oper&lt;&lt;b&lt;&lt;'='&lt;&lt;a/b&lt;&lt;endl;
            else
                cout&lt;&lt;"出错啦!";
        }

   default:
        cout&lt;&lt;"出错啦!";

    }
    return 0;
}

 

 

 

#include "iostream.h"
int main ()
{
    int a,b,max;
    cout&lt;&lt;"请输入两个数据"&lt;&lt;endl;
    cin>&gt;a&gt;&gt;b;
    max=(a&gt;=b)?a:b;
    cout&lt;&lt;"较大的数是"&lt;&lt;max&lt;&lt;endl;
    return 0;

}

 

 

第一天就学这么多   很简单的 所以就没有主题了