Advertisement
adventuretimeh

totale della spesa

Nov 14th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 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. float spesa;
  8. float importo_scontato;
  9. printf("dammi il valore della spesa");
  10. scanf("%f",&spesa);
  11. if (spesa>100)
  12. {
  13. importo_scontato= spesa-spesa*20/100;
  14. printf("importo_scontato vale %f",importo_scontato );
  15. }
  16. else
  17. {
  18.     printf("spesa");
  19.     }
  20.  
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement