Raphafrei

PIM's game

Oct 8th, 2020
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void main(){
  4.     int nMax = 0, multiplo = 0, i;
  5.  
  6.     printf("Insira qual sera o valor maximo: \n");
  7.     scanf("%d", &nMax);
  8.  
  9.     printf("Insira qual sera o valor multiplo: \n");
  10.     scanf("%d", &multiplo);
  11.  
  12.     for(i = 0; i <= nMax; i++){
  13.         if(i % multiplo != 0){
  14.             printf(" %d ", i);
  15.         }else
  16.             PIM();
  17.     }
  18.  
  19.     system("pause");
  20. }
  21.  
  22. void PIM(){
  23.     printf(" PIM\n");
  24. }
Advertisement
Add Comment
Please, Sign In to add comment