Advertisement
adventuretimeh

doppio,triplo (selezione a una via)

Dec 9th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 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 num,doppio,triplo;
  8. printf("\ndammi un numero");
  9. scanf("%d",&num);
  10. if(num>0)
  11. {
  12. printf("\nnumero %d",num);
  13. doppio = num*2;
  14. printf("\n doppio %d",doppio);
  15. int x=7;
  16. printf("\n numero x vale %d",x);
  17. }
  18. triplo=num*3;
  19. printf("\n triplo vale %d",triplo);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement