Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int pierwsza;
- int druga;
- int trzecia;
- int czwarta;
- int main()
- {
- cout<<"Podaj pierwsza liczbe: ";
- cin>>pierwsza;
- cout<<"Podaj druga liczbe: ";
- cin>>druga;
- if (pierwsza < 0)
- {
- trzecia = pierwsza * -1;
- }
- if (druga < 0)
- {
- czwarta = druga * -1;
- }
- if (trzecia > czwarta)
- {
- cout<<"Wieksza liczba bezwzgledna jest "<<pierwsza;
- }
- else if (trzecia < czwarta)
- {
- cout<<"Wieksza liczba bezwzgledna jest "<<druga;
- }
- else if ( pierwsza == druga)
- {
- cout<<"Obie liczby sa sobie rowne";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement