Advertisement
salla

Q20_IP

Oct 21st, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.76 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     float a=0;
  7.     int b=0;
  8.     float soma=0;
  9.     float subt=0;
  10.     float mult=0;
  11.     float div=0;
  12.  
  13.  
  14.  
  15.     printf("\n\n\tDigite um numero: ");
  16.     scanf("%float", &a);
  17.  
  18.     for (b=0;b<=10;b++){
  19.         soma = a + b ;
  20.         printf("\n%.0f + %d = %.0f\n", a, b, soma);
  21.  
  22.     }
  23.     printf("\n\n\n");
  24.     for (b=0;b<=10;b++){
  25.         subt = a - b ;
  26.         printf("\n%.0f - %d = %.0f\n", a, b, subt);
  27.  
  28.  
  29.     }
  30.     printf("\n\n\n");
  31.     for(b=0;b<=10;b++){
  32.         mult = a * b ;
  33.         printf("\n%0.f * %d = %.0f\n", a, b, mult);
  34.  
  35.     }
  36.     printf("\n\n\n");
  37.  
  38.     for(b=1;b<10;b++){
  39.  
  40.         div = a / b;
  41.         printf("\n%.0f / %d = %.2f\n", a, b, div);
  42.  
  43.  
  44.     }
  45.  
  46.  return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement