medajibka

2.1

Apr 18th, 2022 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. //double x;
  5.  int a, b, c;
  6.  
  7. void input() {
  8. //    cout << "Enter x: ";
  9. //    cin >> x;
  10.     cout << "Enter a: ";
  11.     cin >> a;
  12.     cout << "Enter b: ";
  13.     cin >> b;
  14.     cout << "Enter c: ";
  15.     cin >> c;
  16. }
  17.  
  18. int main() {
  19.  
  20.     input();
  21.  
  22. //    while (b < a) {
  23. //        cout << "Input range again:\n";
  24. //        input();
  25. //    }
  26.  
  27.     cout << "Result = " << a * a + b * b + c * c << endl;
  28.     return 0;
  29. }
  30.  
Add Comment
Please, Sign In to add comment