Advertisement
adventuretimeh

esercizio

Nov 30th, 2019
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 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. //scrivi un programma che legge due numeri reali e ne somma le parti intere e quelle decimali visualizzando sullo schermo i risultati parziali e quindi il risultato totale//
  6.  
  7. int main(int argc, char *argv[]) {
  8. float a,b,tot;
  9. printf("numero 1");
  10. scanf("%f",&a);
  11. printf("secondo numero");
  12. scanf("%f",&b);
  13. tot=a+b;
  14. printf("il totale e %6.2f",a,b,tot);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement