Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a,b,sum;
- scanf("%d %d",&a,&b);
- sum = abs(a-b);
- printf("sum = %d",sum);
- return 0;
- }
- #include<stdio.h>
- int main()
- {
- int a,b;
- scanf("%d %d",&a,&b);
- int temp=a;
- a=b;
- b=temp;
- printf("a=%d,b=%d",a,b);
- return 0;
- }
- #include<stdio.h>
- int main()
- {
- int a,b;
- scanf("%d %d",&a,&b);
- a = a+b;
- b =a-b;
- a=a-b;
- printf("a=%d,b=%d",a,b);
- return 0;
- }
- #include<stdio.h>
- int main()
- {
- double u,a,t,s;
- scanf("%lf %lf %lf",&u,&a,&t);
- s=u*t+0.5*a*t*t;
- printf("s=%lf",s);
- return 0;
- }
- #include<stdio.h>
- int main()
- {
- int a,b,c;
- scanf("%d %d %d",&a,&b,&c);
- if((a>b)&&(a>c)){
- printf("%d is the maximum number",a);
- }
- else if((b>a)&&(b>c)){
- printf("%d is the maximum number",b);
- }
- else{
- printf("%d is the maximum number",c);
- }
- return 0;
- }
- #include<stdio.h>
- int main()
- {
- int a,b,c;
- scanf("%d %d %d",&a,&b,&c);
- if(a>b){
- if(a>c){
- printf("%d is the maximum number",a);
- }
- else{printf("%d is the maximum number",c);}
- }
- else{
- if(b>a){if(b>c){
- printf("%d is the maximum number",b);
- }
- else{printf("%d is the maximum number",c);}
- }
- }
- }
- #include<stdio.h>
- int main()
- {
- int s,v,t;
- while(scanf("%d %d",&v,&t)!=EOF)
- {
- printf("%d\n",2*v*t);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement