fork(3) download
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <conio.h>
  4. #include <cstring>
  5. #include <math.h>
  6. #include <cmath>
  7.  
  8. using namespace std;
  9.  
  10.  
  11.  
  12. int main()
  13. {
  14. int x1, x2, x3, y1, y2, y3;
  15. int a, b, c;
  16. int a2, b2, c2, v2;
  17.  
  18. do
  19. {
  20. cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  21.  
  22. a2 = pow(abs((y3-y1)),2) + pow(abs((x3-x1)),2);
  23. b2 = pow(abs((y2-y1)),2) + pow(abs((x2-x1)),2);
  24. c2 = pow(abs((y2-y3)),2) + pow(abs((x2-x3)),2);
  25.  
  26. cout << a2 << endl << b2 << endl << c2 << endl;
  27. a=round(sqrt(a2));
  28. b=round(sqrt(b2));
  29. c=round(sqrt(c2));
  30. cout << a << endl << b << endl << c << endl;
  31.  
  32.  
  33. if(a > b && a > c)
  34. {
  35. if (a2<c2+b2);
  36. cout << 'O';
  37. if (a2=c2+b2)
  38. cout << 'P';
  39. if (a2>c2+b2)
  40. cout << 'R';
  41. }
  42.  
  43. if(b > a && b > c)
  44. {
  45. if (b2<c2+a2);
  46. cout << 'O';
  47. if (b2=c2+a2)
  48. cout << 'P';
  49. if (b2>c2+a2)
  50. cout << 'R';
  51.  
  52. }
  53.  
  54. if(c > a && c> b)
  55. {
  56. if (c2<a2+b2);
  57. cout << 'O';
  58. if (c2=a2+b2)
  59. cout << 'P';
  60. if (c2>a2+b2)
  61. cout << 'R';
  62. }
  63.  
  64.  
  65.  
  66.  
  67.  
  68. }
  69. while ((x1==0) && (x2==0) & (x3==0) && (y1==0) && (y2==0) & (y3==0));
  70.  
  71. return 0;
  72. }
  73.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:19: fatal error: conio.h: No such file or directory
 #include <conio.h>
                   ^
compilation terminated.
stdout
Standard output is empty