Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int WARTOSC_BEZWZGLEDNA(int x)
- {
- if (x < 0)
- {
- x = x * -1;
- }
- return x;
- }
- int main()
- {
- cout << WARTOSC_BEZWZGLEDNA(-5)<<endl;
- cout << WARTOSC_BEZWZGLEDNA(10)<<endl;
- cout << WARTOSC_BEZWZGLEDNA(-99)<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement