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;
- tempa=a%10;
- tempb=b%10;
- int flag = 1;
- while(tempb>0){
- if(tempa == tempb){
- tempa/100;
- tempb/10;
- }
- else{
- printf("NE");
- }
- }
- if(flag==1){
- printf("DA");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement