Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- II
- 6.
- #include<iostream.h>
- #include<conio.h>
- int main()
- {unsigned a,b,c,d,s,p;
- cout<<"Introdu a";cin>>a;
- b=0;s=1;p=1;d=a;
- while(a!=0)
- {
- if(a%10!=0)
- {
- b=b+(a%10)*p;
- p=p*10;
- }
- a=a/10;
- }
- if(d==b)
- {
- cout<<"DA";
- }
- else
- {
- cout<<"NU";
- }
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement