Advertisement
Guest User

asdasda

a guest
Nov 21st, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,b;
  6. scanf("%d %d",&a,&b);
  7. if(a<0 && b<0){
  8. printf("Invalid input");
  9. }
  10. else{
  11. int tempa,tempb;
  12.  
  13. int flag = 1;
  14. while(a>0){
  15. tempa=a;
  16. tempb=b;
  17. if((tempa%10) == (tempb%10)){
  18. tempa=0;
  19. tempb=0;
  20. }
  21. else{
  22. flag=0;
  23. break;
  24. }
  25. a/100;
  26. b/10;
  27. }
  28. if(flag==1){
  29. printf("DA");
  30. } else {
  31. printf("NE");
  32. }
  33. }
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement