#include<iostream>usingnamespace std;intmain(){double a, b;
cin >> a >> b;
cout << a + b << endl;return0;}
608. 差
#include<iostream>usingnamespace std;intmain(){// 定义四个整型变量int a, b, c, d;
cin >> a >> b >> c >> d;int x = a * b - c * d;
cout <<"DIFERENCA = "<< x << endl;return0;}
604. 圆的面积
#include<cstdio>usingnamespace std;intmain(){double PI =3.14159;double radius;scanf("%lf",&radius);double A = PI * radius * radius;printf("A=%.4lf", A);return0;}
605. 简单乘积
#include<iostream>usingnamespace std;intmain(){int a, b;
cin >> a >> b;
cout <<"PROD = "<< a * b << endl;return0;}
606. 平均数1
#include<cstdio>usingnamespace std;intmain(){double a, b;scanf("%lf%lf",&a,&b);printf("MEDIA = %.5lf",(a *3.5+ b *7.5)/(3.5+7.5));return0;}
#include<cstdio>intmain(){int radius;double PI =3.14159;scanf("%d",&radius);printf("VOLUME = %.3lf",4/3.0* PI * radius * radius * radius);return0;}
613. 面积
#include<cstdio>#include<iostream>usingnamespace std;intmain(){double a, b, c;double PI =3.14159;
cin >> a >> b >> c;printf("TRIANGULO: %.3lf\n", a * c /2);printf("CIRCULO: %.3lf\n", PI * c * c);printf("TRAPEZIO: %.3lf\n",(a + b)* c /2);printf("QUADRADO: %.3lf\n", b * b);printf("RETANGULO: %.3lf \n", a * b);return0;}
614. 最大值
#include<iostream>usingnamespace std;intmain(){int a, b, c;
cin >> a >> b >> c;int ab =(a + b +abs(a - b))/2;int abc =(ab + c +abs(ab - c))/2;
cout << abc <<" eh o maior"<< endl;return0;}
615. 油耗
#include<cstdio>usingnamespace std;intmain(){double a, b;scanf("%lf%lf",&a,&b);printf("%.3lf km/l", a / b);return0;}
#include<cstdio>#include<iostream>usingnamespace std;intmain(){double s, t;
cin >> s >> t;printf("%.3lf", s * t /12);return0;}
653. 钞票
#include<cstdio>usingnamespace std;intmain(){int n;scanf("%d",&n);printf("%d \n", n);printf("%d nota(s) de R$ 100,00\n", n /100);
n %=100;printf("%d nota(s) de R$ 50,00\n", n /50);
n %=50;printf("%d nota(s) de R$ 20,00\n", n /20);
n %=20;printf("%d nota(s) de R$ 10,00 \n", n /10);
n %=10;printf("%d nota(s) de R$ 5,00\n", n /5);
n %=5;printf("%d nota(s) de R$ 2,00 \n", n /2);
n %=2;printf("%d nota(s) de R$ 1,00", n /1);return0;}
654. 时间转换
#include<cstdio>usingnamespace std;intmain(){int times, hours, minutes, seconds;scanf("%d",×);
hours = times /3600;
minutes = times %3600/60;
seconds = times %60;printf("%d:%d:%d", hours, minutes, seconds);return0;}
655. 天数转换
#include<cstdio>intmain(){int days;scanf("%d",&days);printf("%d ano(s) \n", days /365);printf("%d mes(es) \n", days %365/30);printf("%d dia(s)", days %365%30);return0;}
656. 钞票和硬币
#include<cstdio>#include<iostream>usingnamespace std;intmain(){double money;scanf("%lf",&money);int f = money *100;
cout <<"NOTAS:"<< endl;printf("%d nota(s) de R$ 100.00\n", f /10000);
f %=10000;printf("%d nota(s) de R$ 50.00\n", f /5000);
f %=5000;printf("%d nota(s) de R$ 20.00\n", f /2000);
f %=2000;printf("%d nota(s) de R$ 10.00\n", f /1000);
f %=1000;printf("%d nota(s) de R$ 5.00\n", f /500);
f %=500;printf("%d nota(s) de R$ 2.00\n", f /200);
f %=200;
cout <<"MOEDAS:"<< endl;printf("%d moeda(s) de R$ 1.00\n", f /100);
f %=100;printf("%d moeda(s) de R$ 0.50\n", f /50);
f %=50;printf("%d moeda(s) de R$ 0.25\n", f /25);
f %=25;printf("%d moeda(s) de R$ 0.10\n", f /10);
f %=10;printf("%d moeda(s) de R$ 0.05\n", f /5);
f %=5;printf("%d moeda(s) de R$ 0.01\n", f /1);return0;}