扯扯拐吧 关注:17贴子:421
  • 3回复贴,共1

欢迎大家来到扯扯拐吧~~~~~

只看楼主收藏回复

此吧无明确定义,搅基聊天水楼都请随意~~~


IP属地:四川来自iPhone客户端1楼2012-05-19 21:49回复
    #include <iostream.h>
    void main ()
    {
    int x;
    cout<<"请输入数字1~7其中的一个数"<<endl;
    cin>>x;
    if(x==1)
    cout<<"monday或星期一"<<endl;
    else
    if(x==2)
    cout<<"tuesday或星期一"<<endl;
    else
    if(x==3)
    cout<<"wednesday或星期三"<<endl;
    else
    if(x==4)
    cout<<"thursday或星期四"<<endl;
    else
    if(x==5)
    cout<<"friday或星期五"<<endl;
    else
    if(x==6)
    cout<<"saturday或星期六"<<endl;
    else
    cout<<"sunday或星期日"<<endl;
    }
       --说着,我脱下了楼主的胖次


    IP属地:四川来自Android客户端2楼2013-12-05 13:26
    回复
      #include<iostream.h>
      void main()
      {
      char x,m,f;
      double kg,cm;
      cout<<"请输入性别,身高"<<endl;
      x=m,f;
      cin>>x;
      cin>>cm;
      if(x=='f')
      kg=cm-105;
      else
      kg=cm-100;
      cout<<"kg="<<kg<<endl;
      }
         --说着,我脱下了楼主的胖次


      IP属地:四川来自Android客户端3楼2013-12-05 13:31
      回复
        #include <iostream.h>
        void main()
        {
        char n;
        double x,y;
        cout<<"请输入x,n,y:";
        cin>>x;
        cin>>n;
        cin>>y;
        if (n!='+' && n!='-' && n!='*' && n!='/')
        cout<<"无效的算数操作符,无法计算"<<endl;
        else
        if (n=='/' && y==0)
        cout<<"无效的算数操作符,无法计算"<<endl;
        else
        if (n=='+')
        cout<<"x+y="<<x+y<<endl;
        else
        if (n=='-')
        cout<<"x-y="<<x-y<<endl;
        else
        if (n=='*')
        cout<<"x*y="<<x*y<<endl;
        else
        cout<<"x/y="<<x/y<<endl;
        }
           --说着,我脱下了楼主的胖次


        IP属地:四川来自Android客户端4楼2013-12-05 13:32
        回复