Advertisement
Ravenbvutt

Untitled

Sep 26th, 2017
10,104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. double a,b,c,d,divAC,divBD;
  8. cout << "Input number for a,b,c,d:" << endl;
  9. cin >> a >> b >> c >> d;
  10. divAC = abs(a - c);
  11. divBD = abs(b - d);
  12. if (divAC == divBD) {
  13. cout << "D";
  14. }
  15. if (divAC == 0) {
  16. cout << "V";
  17. }
  18. if (divBD == 0) {
  19. cout << "G";
  20. }
  21. else {
  22. cout << "CORRECT" << endl;
  23. }
  24. system("pause");
  25. return 0;
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement