Advertisement
Devastano

Base code

Apr 10th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. /*
  2. EXERCICIO NUMERO 2
  3. */
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6.  
  7. int main()
  8. {
  9.     int cont, sum;
  10.     sum = 0;
  11.     printf("Os multiplos de 11 entre (400,300) sao:\n");
  12.     for(cont = 400; cont >= 300; cont--){
  13.         if(cont % 11 == 0){
  14.             printf("Multiplo de 11: %i\n", cont);
  15.             sum += cont;
  16.         }
  17.     }
  18.     printf("Soma dos multiplos de 11 entre (400,300) = %i\n", sum);
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement