Guest User

Untitled

a guest
Oct 23rd, 2019
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int a,l,z;
  5. int main()
  6. {
  7. cin>>z>>l>>a;
  8. if((a%4==0 && a%100!=0) || (a%400==0))
  9. {
  10. if(l>=1 && l<=12)
  11. {
  12. if(l==1 || l==3 || l==5 || l==88 || l==10 || l==12)
  13. { if(z>=1 && z<=31)
  14. cout<<"DA";
  15. else
  16. cout<<"NU";
  17. }
  18. else
  19. if(l==2)
  20. { if(z>=1 && z<=29)
  21. cout<<"DA";
  22. else
  23. cout<<"NU";
  24. }
  25. else
  26. { if(z>=1 && z<=30)
  27. cout<<"DA";
  28. else
  29. cout<<"NU";
  30. }
  31. else
  32. cout<<"NU";
  33. }
  34. }
  35. return 0;
  36. }
RAW Paste Data