Hi.
Ive made this program using if statements i see no errors in it but i dont know my program isnt working on my if statements i mean the if statements are not used in the output. Can u plzz figure out the problem? It works only till scanf statement. #include<stdio.h>
#include<conio.h>
void main ()
{
int d,m;
clrscr();
printf ("Enter the date of your birth\t");
scanf("%d",& d);
printf("\nEnter the month of your birth\t");
scanf("%d",& m);
printf("\n%d-%d",d,m);
if (d>=21 && d<=19 && m==3 && m==4)
{
printf("\nYour star is ARIES");
}
if (d>=20 && d<=20 && m==4 && m==5)
{
printf("\nYour star is TAURUS");
}
if (d>=21 && d<=21 && m==5 && m==6)
{
printf("\nYour star is GEMMINI");
}
if (d>=22 && d<=22 && m==6 && m==7)
{
printf("\nYour star is CANCER");
}
if (d>=23 && d<=22 && m==7 && m==8)
{
printf("\nYour star is LEO");
}
if (d>=23 && d<=22 && m==8 && m==9)
{
printf("\nYour star is VIRGO");
}
if (d>=23 && d<=22 && m==9 && m==10)
{
printf("\nYour star is LIBRA");
}
if (d>=23 && d<=21 && m==10 && m==11)
{
printf("\nYour star is SCORPIO");
}
if (d>=22 && d<=21 && m==11 && m==12)
{
printf("\nYour star is SAGITTARIUS");
}
if (d>=22 && d<=19 && m==12 && m==1)
{
printf("\nYour star is CAPRICORN");
}
if (d>=20 && d<=18 && m==1 && m==2)
{
printf("\nYour star is AQUARIUS");
}
if (d>=19 && d<=20 && m==2 && m==3)
{
printf("\nYour star is PISCES");
}
getch();
}