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