zoukankan      html  css  js  c++  java
  • 参考代码1011-1020

    1011 买签字笔

     1 #include <bits/stdc++.h>
     2 using namespace std;
     3 int main()
     4 {
     5     int a,b;
     6     int c; 
     7     cin>>a>>b;
     8     c=(a*10+b)/19; 
     9     cout<<c<<endl;
    10     return 0;
    11  }

    1012 他们几岁了?

     1 #include <bits/stdc++.h>           
     2 using namespace std;                
     3 int main()                      
     4 {   
     5     int n;
     6     cin>>n;
     7     cout<<n<<endl;
     8     n+=25;
     9     cout<<n<<endl;
    10     n+=25;
    11     cout<<n<<endl;
    12     return 0;         
    13   } 

    1013 买苹果2

     1 #include <bits/stdc++.h>
     2 using namespace std;
     3 int main()
     4 {
     5     int m,n;
     6     cin>>m;
     7     n=(m/3)*4 +m%3;
     8     cout<<n;
     9     return 0;
    10  } 

    1014 直角三角形面积

     1 #include <bits/stdc++.h>
     2 using namespace std;
     3 int main()
     4 {
     5     int a,b;
     6     int c; 
     7     cin>>a>>b;
     8     c=(a*b)/2; 
     9     cout<<c<<endl;
    10     return 0;
    11  }

    1015 正方体的表面积

     1 #include <bits/stdc++.h>
     2 using namespace std;
     3 int main()
     4 {
     5     int a;
     6     int c; 
     7     cin>>a;
     8     c=6*(a*a); 
     9     cout<<c<<endl;
    10     return 0;
    11  }

    1016 计算分数的浮点数值

     1 #include <bits/stdc++.h>           
     2 using namespace std;                
     3 int main()                      
     4 {   
     5     int a,b;
     6     cin>>a>>b;
     7     double c;
     8     c=a/(b*1.0);
     9 //    cout<<fixed<<setprecision(9)<<c<<endl;
    10     printf("%.9lf
    ",c);
    11     return 0;         
    12   }

    1017 三个数平均值

     1 #include <bits/stdc++.h>           
     2 using namespace std;                
     3 int main()                      
     4 {   
     5     int a,b,c;
     6     cin>>a>>b>>c;
     7     double d;
     8     d=(a+b+c)/3.0;
     9     printf("%.1lf
    ",d);
    10     return 0;         
    11   }

    1018 温度转化

     1 #include <bits/stdc++.h>           
     2 using namespace std;                
     3 int main()                      
     4 {   //C = 5*(F-32)/9 
     5     double f,c;
     6     cin>>f;
     7 
     8     c=5*(f-32)/9.0;
     9     printf("%.5lf
    ",c);
    10     return 0;         
    11   } 

    1019 梯形面积

    #include <bits/stdc++.h>           
    using namespace std;                
    int main()                      
    {   int a,b,c; 
        double s;
        cin>>a>>b>>c;
        s=(a+b)*c/2.0;
        printf("%.2lf
    ",s);
        return 0;         
      } 

    1020 四舍五入

     1 #include <bits/stdc++.h>           
     2 using namespace std;                
     3 int main()                      
     4 {   
     5     double a;
     6     int b;
     7     cin>>a>>b;
     8     a=a*pow(10,b);
     9     a=(int)(a+0.5);
    10     a=a*1.0/pow(10,b);
    11     printf("%0.*lf
    ",b,a);
    12     return 0;
    13   } 
  • 相关阅读:
    ER图
    uml图
    第一个迭代任务的制作
    软件测试
    实训记录
    UML系列图——ER图
    UML系列图——用例图
    第一个迭代任务进度
    第一个迭代任务
    需求分析——WBS
  • 原文地址:https://www.cnblogs.com/pythen/p/11684786.html
Copyright © 2011-2022 走看看