C Program For Zodiac Sign (Stars)
Code:
#include<stdio.h>Output:
#include<conio.h>
main()
{
int month, date, a=83,b=72,c=69,d=90,e=82,f=79, g=90, q=3;
printf("Enter Month ");
scanf("%d",&month);
if(month<=12)
{
printf("Enter Day ");
scanf("%d",&date);
/* Aquarius */
if(month==1 || month==2)
{
if(month==1)
{
if(date>=21)
{
printf("\t\t**************************\n");
printf("\t\t*\tAquarius\t*\n");
printf("\t\t**************************\n");
}
}
else if(month==2)
{
if(date<=19)
{
printf("\t\t*************************\n");
printf("\t\t*\tAquarius\t*\n");
printf("\t\t*************************\n");
}
}
}
/* PISCES */
if(month==2 || month==3)
{
if(month==2)
{
if(date>=20)
{
printf("\t\t*************************\n");
printf("\t\t*\tPISCES \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==3)
{
if(date<=20)
{
printf("\t\t*************************\n");
printf("\t\t*\tPISCES \t*\n");
printf("\t\t*************************\n");
}
}
}
/* ARIES */
if(month==3 || month==4)
{
if(month==3)
{
if(date>=21)
{
printf("\t\t*************************\n");
printf("\t\t*\t ARIES \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==4)
{
if(date<=20)
{
printf("\t\t*************************\n");
printf("\t\t*\t ARIES \t*\n");
printf("\t\t*************************\n");
}
}
}
/* TAURUS */
if(month==4 || month==5)
{
if(month==4)
{
if(date>=21)
{
printf("\t\t*************************\n");
printf("\t\t*\t TAURUS \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==5)
{
if(date<=21)
{
printf("\t\t*************************\n");
printf("\t\t*\t TAURUS \t*\n");
printf("\t\t*************************\n");
}
}
}
/* GEMENI */
if(month==5 || month==6)
{
if(month==5)
{
if(date>=22)
{
printf("\t\t*************************\n");
printf("\t\t*\t GEMENI \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==6)
{
if(date<=21)
{
printf("\t\t*************************\n");
printf("\t\t*\t GEMENI \t*\n");
printf("\t\t*************************\n");
}
}
}
/* CANCER */
if(month==6 || month==7)
{
if(month==6)
{
if(date>=22)
{
printf("\t\t*************************\n");
printf("\t\t*\t CANCER \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==7)
{
if(date<=22)
{
printf("\t\t*************************\n");
printf("\t\t*\t CANCER \t*\n");
printf("\t\t*************************\n");
}
}
}
/* LEO */
if(month==7 || month==8)
{
if(month==7)
{
if(date>=23)
{
printf("\t\t*************************\n");
printf("\t\t*\t LEO \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==8)
{
if(date<=23)
{
printf("\t\t*************************\n");
printf("\t\t*\t LEO \t*\n");
printf("\t\t*************************\n");
}
}
}
/* VIRGO */
if(month==8 || month==9)
{
if(month==8)
{
if(date>=24)
{
printf("\t\t*************************\n");
printf("\t\t*\t VIRGO \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==9)
{
if(date<=23)
{
printf("\t\t*************************\n");
printf("\t\t*\t VIRGO \t*\n");
printf("\t\t*************************\n");
}
}
}
/* LIBRA */
if(month==9 || month==10)
{
if(month==9)
{
if(date>=24)
{
printf("\t\t*************************\n");
printf("\t\t*\t LIBRA \t*\n");
printf("\t\t*************************\n");
}
}
else if(month==10)
{
if(date<=23)
{
printf("\t\t*************************\n");
printf("\t\t*\t LIBRA \t*\n");
printf("\t\t*************************\n");
}
}
}
/* SCORPIO */
if(month==10 || month==11)
{
if(month==10)
{
if(date>=24)
{
printf("\t\t*************************\n");
printf("\t\t*\t SCORPIO\t*\n");
printf("\t\t*************************\n");
}
}
else if(month==11)
{
if(date<=22)
{
printf("\t\t*************************\n");
printf("\t\t*\t SCORPIO\t*\n");
printf("\t\t*************************\n");
}
}
}
/* SAGITTARIOUS */
if(month==11 || month==12)
{
if(month==11)
{
if(date>=23)
{
printf("\t\t*************************\n");
printf("\t\t*\tSAGITTARIOUS\t*\n");
printf("\t\t*************************\n");
}
}
else if(month==12)
{
if(date<=21)
{
printf("\t\t*************************\n");
printf("\t\t*\tSAGITTARIOUS\t*\n");
printf("\t\t*************************\n");
}
}
}
/* CAPRICON */
if(month==12 || month==1)
{
if(month==12)
{
if(date>=22)
{
printf("\t\t*************************\n");
printf("\t\t*\tCAPRICON\t*\n");
printf("\t\t*************************\n");
}
}
else if(month==1)
{
if(date<=20)
{
printf("\t\t*************************\n");
printf("\t\t*\tCAPRICON\t*\n");
printf("\t\t*************************\n");
}
}
}
printf("\t %c%c%c Written By %c %c %c %c %c %c %c %c%c%c ", q,q,q,a,b,c,b,e,f,d,q,q,q);
}
else
printf("invalid");
getch();
}
thanks sir
ReplyDeleteYou Most Welcome
ReplyDelete