JakubKaczmarek_123

zadanie 17

Nov 13th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. float x;
  5.  
  6. int main()
  7. {
  8.     cout << "wprowadz liczbe: " << endl;
  9.     cin >> x;
  10.     if (x < 0) cout << "wartosc bezwzgledna liczby " << x << " to: " << -x << endl;
  11.     else cout << "wartosc bezwzgledna liczby " << x << " to: " << x << endl;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment