Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int a,b;
- scanf("%d %d",&a,&b);
- if(a<0 && b<0){
- printf("Invalid input");
- }
- else{
- int tempa,tempb;
- int flag = 1;
- while(a>0){
- tempa=a;
- tempb=b;
- if((tempa%10) == (tempb%10)){
- tempa=0;
- tempb=0;
- }
- else{
- flag=0;
- break;
- }
- a/100;
- b/10;
- }
- if(flag==1){
- printf("DA");
- } else {
- printf("NE");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement