Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- int main ()
- {
- int x,s,d,j;
- gospa:cout<<"Unesi 3-znamenkasti broj ";
- cin>>x;
- if(x>99 && x<1000)
- {
- s=x/100;
- d=(x/10)%10;
- j=x%10;
- if(s==j)
- cout<<x<<" je pailndrom"<<endl;
- else
- cout<<x<<" nije palindrom"<<endl;
- if(s%2==1 && d%2==1 && j%2==1)
- cout<<x<<" je potpuno neparan"<<endl;
- else
- cout<<x<<" nije potpuno neparan"<<endl;
- }
- else
- {
- cout<<"Broj nije 3-znamenkast"<<endl;
- goto gospa;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement