Advertisement
a53

cmmk

a53
Oct 25th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n,k;
  7. cin>>n>>k;
  8. bool mai_mici_sau_egale=true;
  9. while(n)
  10. if(n%10>k)
  11. {
  12. mai_mici_sau_egale=false;
  13. break;
  14. }
  15. else
  16. n/=10;
  17. if(mai_mici_sau_egale)
  18. cout<<"DA\n";
  19. else
  20. cout<<"NU\n";
  21. return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement