Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.09 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4.  
  5. {
  6.  
  7.  
  8. int ans = 0;
  9. char choice,e;
  10.  
  11. int month, day;
  12.  
  13. do{
  14. cout<<"******************ZODIAC SIGN GENERATOR******************"<<endl;
  15. cout <<"Enter the Birthmonth number : ";
  16. cin >> month;
  17. cout <<"\n" <<"Enter Day of Birth: ";
  18. cin >> day;
  19.  
  20.  
  21. if ((month == 1 && day >= 20 && day < 32 ) || (month == 2 && day <= 18 && day > 0 ))
  22.  
  23. {
  24. if(month==1)
  25. cout<<"\n" <<"The Zodiac Sign for January "<<day << " is Aquarius.";
  26. else if
  27. (month==2)
  28. cout<<"\n" <<"The Zodiac Sign for February "<<day << " is Aquarius.";
  29.  
  30. }
  31.  
  32.  
  33. else if ((month == 3 && day >= 21 && day < 32 ) || (month == 4 && day <= 19 && day > 0 ))
  34. {
  35. if(month==3)
  36. cout<<"\n" <<"The Zodiac Sign for March "<<day << " is Aries.";
  37. else if
  38. (month==4)
  39. cout<<"\n" <<"The Zodiac Sign for April "<<day << " is Aries.";
  40.  
  41. }
  42.  
  43. else if ((month == 4 && day >= 20 && day < 31 ) || (month == 5 && day <= 20 && day > 0 ))
  44. {
  45. if(month==4)
  46. cout<<"\n" <<"The Zodiac Sign for April "<<day << " is Taurus.";
  47. else if
  48. (month==5)
  49. cout<<"\n" <<"The Zodiac Sign for May "<<day << " is Taurus.";
  50.  
  51. }
  52.  
  53.  
  54.  
  55. else if ((month == 5 && day >= 21 && day < 32 ) || (month == 6 && day <= 20 && day > 0 ))
  56. {
  57. if(month==5)
  58. cout<<"\n" <<"The Zodiac Sign for May "<<day << " is Gemini.";
  59. else if
  60. (month==6)
  61. cout<<"\n" <<"The Zodiac Sign for June "<<day << " is Gemini.";
  62.  
  63. }
  64.  
  65.  
  66. else if ((month == 2 && day >= 19 && day < 30 ) || (month == 3 && day <= 18 && day > 0 ))
  67. {
  68. if(month==2)
  69. cout<<"\n" <<"The Zodiac Sign for February "<<day << " is Pisces.";
  70. else if
  71. (month==3)
  72. cout<<"\n" <<"The Zodiac Sign for March "<<day << " is Pisces.";
  73.  
  74. }
  75.  
  76.  
  77. else if ((month == 6 && day >= 21 && day < 31 ) || (month == 7 && day <= 22 && day > 0 ))
  78. {
  79. if(month==6)
  80. cout<<"\n" <<"The Zodiac Sign for June "<<day << " is Cancer.";
  81. else if
  82. (month==7)
  83. cout<<"\n" <<"The Zodiac Sign for July "<<day << " is Cancer.";
  84.  
  85. }
  86.  
  87.  
  88. else if ((month == 7 && day >= 23 && day < 32) || (month == 8 && day <= 22 && day > 0 ))
  89. {
  90. if(month==7)
  91. cout<<"\n" <<"The Zodiac Sign for July "<<day << " is Leo.";
  92. else if
  93. (month==8)
  94. cout<<"\n" <<"The Zodiac Sign for August "<<day << " is Leo.";
  95.  
  96. }
  97.  
  98.  
  99. else if ((month == 8 && day >= 23 && day < 32) || (month == 9 && day <= 22 && day > 0 ))
  100. {
  101. if(month==8)
  102. cout<<"\n" <<"The Zodiac Sign for August"<<day << " is Virgo.";
  103. else if
  104. (month==9)
  105. cout<<"\n" <<"The Zodiac Sign for September "<<day << " is Virgo.";
  106.  
  107. }
  108.  
  109.  
  110. else if ((month == 9 && day >= 23 && day < 31 ) || (month == 10 && day <= 22 && day > 0 ))
  111. {
  112. if(month==9)
  113. cout<<"\n" <<"The Zodiac Sign for September "<<day << " is Libra.";
  114. else if
  115. (month==10)
  116. cout<<"\n" <<"The Zodiac Sign for October "<<day << " is Libra.";
  117.  
  118. }
  119.  
  120.  
  121. else if ((month == 10 && day >= 23 && day < 32 ) || (month == 11 && day <= 21 && day > 0 ))
  122. {
  123. if(month==10)
  124. cout<<"\n" <<"The Zodiac Sign for October "<<day << " is Scorpio.";
  125. else if
  126. (month==11)
  127. cout<<"\n" <<"The Zodiac Sign for November "<<day << " is Scorpio.";
  128.  
  129. }
  130. else if ((month == 11 && day >= 22 && day < 31 ) || (month == 12 && day <= 21 && day > 0 ))
  131. {
  132. if(month==11)
  133. cout<<"\n" <<"The Zodiac Sign for November "<<day << " is Sagittarius.";
  134. else if
  135. (month==12)
  136. cout<<"\n" <<"The Zodiac Sign for December "<<day << " is Sagittarius.";
  137.  
  138. }
  139. else if ((month == 12 && day >= 22 && day < 32) || (month == 1 && day <= 19 && day > 0 ))
  140. {
  141. if(month==12)
  142. cout<<"\n" <<"The Zodiac Sign for December "<<day << " is Capricorn.";
  143. else if
  144. (month==1)
  145. cout<<"\n" <<"The Zodiac Sign for January "<<day << " is Capricorn.";
  146.  
  147. }
  148.  
  149.  
  150.  
  151. else
  152. cout <<"\n" << "\n" << "INVALID INPUT \n";
  153.  
  154. cout<<"\nDo you want to enter again ?: Y or N ";
  155. cin>>choice;
  156.  
  157. while (toupper(choice) == 'Y'){
  158. system("cls");
  159. return main(); }
  160. char choys = ' ';
  161. cout<<"Do you want to Exit?: ";
  162. cin>>choice;
  163. }while(toupper(choice) != 'Y');
  164.  
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement