Chinese Zodiac (shio / Shēngxiào) C++ code






The Shēngxiào, literally "birth likeness", is also known in English as the 
Chinese zodiac. Zodiac derives from the similar concept in western astrology 
and means "circle of animals". The Chinese zodiac is a scheme 
and systematic plan of future action that relates each 
year to an animal and its reputed attributes according to a 
12-year cycle, and it remains popular in several East Asian countries including ChinaVietnamKorea and Japan.




here is the code:
#include <iostream>
#include <conio.h>
using namespace std;
main()
{
      int a,b,c,d;
      cout<<"Enter Your Birthday Date  = ";cin>>a;
      cout<<"Enter Your Birthday Month = ";cin>>b;
      cout<<"Enter Your Birthday Year  = ";cin>>c;
      d=((c-4)%12);
      cout<<endl;
      if(d==0)
      {
              cout<<"Your Shio is Mouse ";
      }
      else
      if(d==1)
      {
              cout<<"Your Shio is Buffalo ";
      }
      else
      if(d==2)
      {
              cout<<"Your Shio is Tiger ";
      }
      if(d==3)
      {
              cout<<"Your Shio is Rabbit ";
      }
      else
      if(d==4)
      {
              cout<<"Your Shio is Dragon ";
      }
      else
      if(d==5)
      {
              cout<<"Your Shio is Snake ";
      }
      if(d==6)
      {
              cout<<"Your Shio is Horse ";
      }
      else
      if(d==7)
      {
              cout<<"Your Shio is Goat ";
      }
      else
      if(d==8)
      {
              cout<<"Your Shio is Monkey ";
      }
      if(d==9)
      {
              cout<<"Your Shio is Chicken ";
      }
      else
      if(d==10)
      {
              cout<<"Your Shio is Dog ";
      }
      else
      if(d==11)
      {
              cout<<"Your Shio is Pig ";
      }
      
      getch();
}

<

0 komentar:

Posting Komentar