Advertisement
Guest User

Nadim Mahmud 191-15-2631

a guest
May 23rd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.51 KB | None | 0 0
  1.  
  2. #include<stdio.h>
  3. int main()
  4. {
  5.     int a,b,sum;
  6.     scanf("%d %d",&a,&b);
  7.     sum = abs(a-b);
  8.     printf("sum = %d",sum);
  9.     return 0;
  10.  
  11. }
  12.  
  13.  
  14. #include<stdio.h>
  15. int main()
  16. {
  17.     int a,b;
  18.     scanf("%d %d",&a,&b);
  19.     int temp=a;
  20.     a=b;
  21.     b=temp;
  22.     printf("a=%d,b=%d",a,b);
  23.     return 0;
  24. }
  25.  
  26.  
  27. #include<stdio.h>
  28. int main()
  29. {
  30.     int a,b;
  31.     scanf("%d %d",&a,&b);
  32.     a = a+b;
  33.     b =a-b;
  34.     a=a-b;
  35.     printf("a=%d,b=%d",a,b);
  36.     return 0;
  37.  
  38. }
  39.  
  40. #include<stdio.h>
  41. int main()
  42. {
  43.     double u,a,t,s;
  44.     scanf("%lf %lf %lf",&u,&a,&t);
  45.     s=u*t+0.5*a*t*t;
  46.     printf("s=%lf",s);
  47.     return 0;
  48. }
  49.  
  50. #include<stdio.h>
  51. int main()
  52. {
  53.     int a,b,c;
  54.     scanf("%d %d %d",&a,&b,&c);
  55.     if((a>b)&&(a>c)){
  56.         printf("%d is the maximum number",a);
  57.     }
  58.     else if((b>a)&&(b>c)){
  59.         printf("%d is the maximum number",b);
  60.     }
  61.     else{
  62.         printf("%d is the maximum number",c);
  63.     }
  64.     return 0;
  65. }
  66.  
  67.  
  68. #include<stdio.h>
  69. int main()
  70. {
  71.     int a,b,c;
  72.     scanf("%d %d %d",&a,&b,&c);
  73.     if(a>b){
  74.         if(a>c){
  75.             printf("%d is the maximum number",a);
  76.         }
  77.         else{printf("%d is the maximum number",c);}
  78.     }
  79.     else{
  80.         if(b>a){if(b>c){
  81.             printf("%d is the maximum number",b);
  82.         }
  83.         else{printf("%d is the maximum number",c);}
  84.  
  85.         }
  86.     }
  87. }
  88.  
  89.  
  90.  
  91.  
  92. #include<stdio.h>
  93. int main()
  94. {
  95.     int s,v,t;
  96.     while(scanf("%d %d",&v,&t)!=EOF)
  97.     {
  98.         printf("%d\n",2*v*t);
  99.     }
  100.      return 0;
  101.  
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement