Advertisement
Guest User

Madhan

a guest
Oct 23rd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int day,month;
  8. cout<<"day?"<<endl;
  9. cin >> day;
  10. cout<<"month?"<<endl;
  11. cin >> month;
  12.  
  13. if (month==1 || month==2){
  14. cout<<"winter"<<endl;
  15. }
  16. else if (month==3 && day<21){
  17. cout<<"winter"<<endl;
  18. }
  19. else if (month==3 && day>=21){
  20. cout<<"spring"<<endl;
  21. }
  22. else if (month==4|| month==5){
  23. cout<<"spring"<<endl;
  24. }
  25. else if (month==6 && day<22){
  26. cout<<"spring"<<endl;
  27. }
  28. else if (month==6 && day>=22){
  29. cout<<"summer"<<endl;
  30. }
  31. else if(month==7 || month==8){
  32. cout<<"summer"<<endl;
  33.  
  34. }
  35. else if (month==9 && day<23){
  36. cout<<"summer"<<endl;
  37.  
  38. }
  39. else if (month==9 && day>=23){
  40. cout<<"autumn"<<endl;
  41.  
  42. }
  43. else if (month==10 || month==11){
  44. cout<<"autumn"<<endl;
  45.  
  46. }
  47. else if(month==12 && day<24 ) {
  48. cout<<"autumn"<<endl;
  49.  
  50. }
  51. else if(month==12 && day>=24 ) {
  52. cout<<"winter"<<endl;
  53. }
  54.  
  55. return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement