JakubKaczmarek_123

zadanie 2

Jan 22nd, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4. int WARTOSC_BEZWZGLEDNA(int a);
  5. int main(){
  6. cout << "wartosc bezwzgledna to: " << WARTOSC_BEZWZGLEDNA(10) << endl;
  7. cout << "wartosc bezwzgledna to: " << WARTOSC_BEZWZGLEDNA(16) << endl;
  8. cout << "wartosc bezwzgledna to: " << WARTOSC_BEZWZGLEDNA(-16) << endl;
  9. cout << "wartosc bezwzgledna to: " << WARTOSC_BEZWZGLEDNA(-20) << endl;
  10. }
  11. int WARTOSC_BEZWZGLEDNA(int a){
  12. return abs(a);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment