Advertisement
adventuretimeh

divisione con resto

Nov 25th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 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 resto;
  8. int risultato;
  9. int div;
  10. int dividendo;
  11. int divisore;
  12. printf("inserisci il dividendo");
  13. scanf("%d",&dividendo);
  14. printf("inserisci il divisiore");
  15. scanf("%d",&divisore);
  16. resto=dividendo%divisore;
  17. div=dividendo-resto;
  18. risultato=div/divisore;
  19. printf("la divisione con resto e %d",resto,risultato,div,dividendo,divisore);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement