Advertisement
Guest User

Neymety

a guest
Sep 19th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <stdio.h>
  4. #include <math.h>
  5. using namespace std;
  6. int main() {
  7. float a, b, c, d, e, f, h;
  8. float result;
  9. float fractio;
  10. printf("input a\n");
  11. cin >> a;
  12. printf("input b\n");
  13. cin >> b;
  14. printf("input c\n");
  15. cin >> c;
  16. printf("input d\n");
  17. cin >> d;
  18. printf("input e\n");
  19. cin >> e;
  20. printf("input f\n");
  21. cin >> f;
  22. printf("input h\n");
  23. cin >> h;
  24. result = 4*(a+b+2*a*b)-c+d-5e+1f-h;
  25. if (result > 0){ fractio = result - (int)result; }
  26. printf("result is %f\n", result),
  27. printf("Дробная часть %f\n", fractio),
  28. printf("Меньше нуля!\n");
  29. cin >> a;
  30. system("pause")
  31. return 0
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement