Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int wartosc_bezwzgledna()
- {
- int x;
- if (x<0)
- { x=(x*-1);
- cout<<x; }
- else {cout<<x;};
- }
- int main()
- {
- int x;
- cout<<"Podaj liczbe: "<<endl;
- cin>>x;
- cout<<"|"<<x<<"|= ";
- wartosc_bezwzgledna();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement