Guest User

Untitled

a guest
Oct 23rd, 2019
67
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. if(l>=1 && l<=12)
  10. if(l==1 || l==3 || l==5 || l==7 || l==8 || l==10 || l==12)
  11. if(z>=1 && z<=31)
  12. cout<<"DA";
  13. else
  14. cout<<"NU";
  15. else
  16. if(l==2)
  17. if(z>=1 && z<=29)
  18. cout<<"DA";
  19. else
  20. cout<<"NU";
  21. else
  22. if(z>=1 && z<=30)
  23. cout<<"DA";
  24. else
  25. cout<<"NU";
  26.  
  27. else
  28. cout<<"NU";
  29. else
  30.  
  31. if(l>=1 && l<=12)
  32. if(l==1 || l==3 || l==5 || l==7 || l==8 || l==10 || l==12)
  33. if(z>=1 && z<=31)
  34. cout<<"DA";
  35. else
  36. cout<<"NU";
  37. else
  38. if(l==2)
  39. if(z>=1 && z<=28)
  40. cout<<"DA";
  41. else
  42. cout<<"NU";
  43. else
  44. if(z>=1 && z<=30)
  45. cout<<"DA";
  46. else
  47. cout<<"NU";
  48.  
  49. else
  50. cout<<"NU";
  51. return 0;
  52. }
RAW Paste Data