-
Linguagem
C
-
Descrição
Signo do zodíaco
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 dia, mes;
printf ("Digite o valor do dia: ");
scanf ("%d", &dia);
(void) getchar ();
printf ("Digite o valor do mes: ");
scanf ("%d", &mes);
(void) getchar ();
if((dia>=21&&mes==3)||(dia<=20&&mes==4))
printf ("\265ries\n");
if((dia>=24&&mes==9)||(dia<=23&&mes==10))
printf ("Libra\n");
if((dia>=21&&mes==4)||(dia<=21&&mes==5))
printf ("Touro\n");
if((dia>=24&&mes==10)||(dia<=22&&mes==11))
printf ("Escorpi\306o\n");
if((dia>=22&&mes==5)||(dia<=21&&mes==6))
printf ("G\210meos\n");
if((dia>=23&&mes==11)||(dia<=21&&mes==12))
printf ("Sagit\240rio\n");
if((dia>=21&&mes==6)||(dia<=23&&mes==7))
printf ("C\203ncer\n");
if((dia>=22&&mes==12)||(dia<=20&&mes==1))
printf ("Capric\242rnio\n");
if((dia>=24&&mes==7)||(dia<=23&&mes==8))
printf ("Le\306o\n");
if((dia>=21&&mes==1)||(dia<=19&&mes==2))
printf ("Aqu\240rio\n");
if((dia>=24&&mes==8)||(dia<=23&&mes==9))
printf ("Virgem\n");
if((dia>=20&&mes==2)||(dia<=20&&mes==3))
printf ("Peixes\n");
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}
#include <stdlib.h>
int main (void)
{
int dia, mes;
printf ("Digite o valor do dia: ");
scanf ("%d", &dia);
(void) getchar ();
printf ("Digite o valor do mes: ");
scanf ("%d", &mes);
(void) getchar ();
if((dia>=21&&mes==3)||(dia<=20&&mes==4))
printf ("\265ries\n");
if((dia>=24&&mes==9)||(dia<=23&&mes==10))
printf ("Libra\n");
if((dia>=21&&mes==4)||(dia<=21&&mes==5))
printf ("Touro\n");
if((dia>=24&&mes==10)||(dia<=22&&mes==11))
printf ("Escorpi\306o\n");
if((dia>=22&&mes==5)||(dia<=21&&mes==6))
printf ("G\210meos\n");
if((dia>=23&&mes==11)||(dia<=21&&mes==12))
printf ("Sagit\240rio\n");
if((dia>=21&&mes==6)||(dia<=23&&mes==7))
printf ("C\203ncer\n");
if((dia>=22&&mes==12)||(dia<=20&&mes==1))
printf ("Capric\242rnio\n");
if((dia>=24&&mes==7)||(dia<=23&&mes==8))
printf ("Le\306o\n");
if((dia>=21&&mes==1)||(dia<=19&&mes==2))
printf ("Aqu\240rio\n");
if((dia>=24&&mes==8)||(dia<=23&&mes==9))
printf ("Virgem\n");
if((dia>=20&&mes==2)||(dia<=20&&mes==3))
printf ("Peixes\n");
putchar ('\n');
system ("pause");
return EXIT_SUCCESS;
}