Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int vout;
  7. float temp;
  8. printf("Inserire un voltaggio in mV: ");
  9. scanf("%d", &vout);
  10. if(vout>0 && vout<20)
  11. {
  12. temp = 3.0/4 * vout;
  13. }
  14. if(vout>20 && vout<55)
  15. {
  16. temp = 12.0/35 * vout + 57.0/7;
  17. }
  18. if(vout>55 && vout<100)
  19. {
  20. temp = 8.0/45 * vout + 155.0/9;
  21. }
  22. printf("La temperatura relativa a %dmV corrisponde a %f", vout, temp);
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement