Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1.  
  2. /*
  3. * @file UE3_Aufgabe1.c
  4. * @brief File contains the main program
  5. * @author Emil Wojciechowicz
  6. * @date 30.03.2015
  7. */
  8.  
  9.  
  10. #include<stdio.h>
  11. #include<conio.h>
  12. #include<math.h>
  13. #include<stdlib.h>
  14. /**
  15. * @fn int main(void)
  16. * @brief calculate
  17. * @param void
  18. * @return EXIT_SUCCESS
  19. * @author Emil Wojciechowicz
  20. * @date 30.03.2015
  21. */
  22. int main(void)
  23. {
  24. float fa, fb, fc;
  25.  
  26. printf("Folgende Gleichung wird berechnet\n c = a - 4.5 * b - b * 10.2\n\n");
  27. printf("===========================\n");
  28. printf("Geben Sie nun Werte fuer a und b ein\n");
  29.  
  30. printf("Geben Sie den Wert fuer a ein ");
  31. scanf_s("%f", &fa);
  32.  
  33. printf("Geben Sie den Wert fuer b ein ");
  34. scanf_s("%f", &fb);
  35.  
  36. fc = (fa - (4.5f * fb) - (fb * 10.2f));
  37.  
  38. printf("Das ergebnis ist = %.2f\n", fc);
  39.  
  40.  
  41. _getch();
  42. return EXIT_SUCCESS;
  43.  
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement