Advertisement
adventuretimeh

numero divisibile per 5

Nov 7th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. int main(int argc, char *argv[]) {
  7.     int numero;
  8.     int resto;
  9.     printf("dammi un numero");
  10.     scanf("%d",&numero);
  11.     if (numero%5==0)
  12.     {
  13.         printf ("il numero e divisibile per 5");
  14.         }
  15.         else
  16.         printf("il numero non e divisibile per 5");
  17.        
  18.        
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement