-
Language
C
-
Description
Astrological sign
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
int day, month;
printf ("Enter the value of day: ");
scanf ("%d", &day);
(void) getchar ();
printf ("Enter the value of month: ");
scanf ("%d", &month);
(void) getchar ();
if((day>=21&&month==3)||(day<=20&&month==4))
printf ("Aries\n");
if((day>=24&&month==9)||(day<=23&&month==10))
printf ("Libra\n");
if((day>=21&&month==4)||(day<=21&&month==5))
printf ("Taurus\n");
if((day>=24&&month==10)||(day<=22&&month==11))
printf ("Scorpio\n");
if((day>=22&&month==5)||(day<=21&&month==6))
printf ("Gemini\n");
if((day>=23&&month==11)||(day<=21&&month==12))
printf ("Sagittarius\n");
if((day>=21&&month==6)||(day<=23&&month==7))
printf ("Cancer\n");
if((day>=22&&month==12)||(day<=20&&month==1))
printf ("Capricorn\n");
if((day>=24&&month==7)||(day<=23&&month==8))
printf ("Leo\n");
if((day>=21&&month==1)||(day<=19&&month==2))
printf ("Aquarius\n");
if((day>=24&&month==8)||(day<=23&&month==9))
printf ("Virgo\n");
if((day>=20&&month==2)||(day<=20&&month==3))
printf ("Pisces\n");
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}
#include <stdlib.h>
int main (void)
{
int day, month;
printf ("Enter the value of day: ");
scanf ("%d", &day);
(void) getchar ();
printf ("Enter the value of month: ");
scanf ("%d", &month);
(void) getchar ();
if((day>=21&&month==3)||(day<=20&&month==4))
printf ("Aries\n");
if((day>=24&&month==9)||(day<=23&&month==10))
printf ("Libra\n");
if((day>=21&&month==4)||(day<=21&&month==5))
printf ("Taurus\n");
if((day>=24&&month==10)||(day<=22&&month==11))
printf ("Scorpio\n");
if((day>=22&&month==5)||(day<=21&&month==6))
printf ("Gemini\n");
if((day>=23&&month==11)||(day<=21&&month==12))
printf ("Sagittarius\n");
if((day>=21&&month==6)||(day<=23&&month==7))
printf ("Cancer\n");
if((day>=22&&month==12)||(day<=20&&month==1))
printf ("Capricorn\n");
if((day>=24&&month==7)||(day<=23&&month==8))
printf ("Leo\n");
if((day>=21&&month==1)||(day<=19&&month==2))
printf ("Aquarius\n");
if((day>=24&&month==8)||(day<=23&&month==9))
printf ("Virgo\n");
if((day>=20&&month==2)||(day<=20&&month==3))
printf ("Pisces\n");
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}