1 like 0 dislike
1.4k views

Write a program to find your zodiac sign. The program will take your date of birth as an input (YYYY/MM/DD) and output your zodiac. You can find information about zodiac here.

Example:

Input:

Input your birthday (YYYY/MM/DD):
1999/6/2

Output:

Your zodiac is Gemini

 

Input:

Input your birthday (YYYY/MM/DD):
1996/10/3

Output

Your zodiac is Libra
[Exercise] Coding (C) - asked in Chapter 3: Branching, Looping and Functions by (5.2k points)
ID: 28184 - Available when: Unlimited - Due to: Unlimited

edited by | 1.4k views
0 0
should I write all zodiac?

23 Answers

0 like 0 dislike
Hidden content!
** ** *** * * ***
* * * *** *

/* run this ***** using the * pauser or add your own getch, ** **** *** ** * or input loop */

int * * argc, char * {
* ** *** ** * int * ***
*** * ** * ******* * your ** * * * * * * ** *
* ** * * **** * ** * ** ****** * * * * * ** *
** * * * ** *** * * * *** *** *
* *** *** * ***** ***** * * * ******** * * is * *****
****** ** ** * * * * * *
* * * * * * ** * * }
** * ***** * * * else * * ** * * ** *** *
* * * ***** * * * * * * * * ** * *** ** * * ** zodiac is * *
*** * * ** }
* * *** * **** 0;
}
20/100 answered by (227 points)
0 0
prog.c: In function 'main':
prog.c:10:13: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
  if(birthday="1999/6/2"){
             ^
prog.c:14:19: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
   else if(birthday="1996/10/3"){
                   ^
0 0
it run well on my computer
the input,output is correct.
0 like 0 dislike
Hidden content!
* * * ** * **
* **** * * *

/* run this ***** using the ** * pauser or add your own getch, *** *** * ** * * or input loop */

int ** * argc, char * ** {
* **** ** int ** ***
***** * **** *** * ** * ** your **** * * *** * ** *
*** * * * * * * * * ** * ** ** **
*** * * * ** * ** *
* *** * * * ** * * * * is *** *** **
** ** ** ***
*** * * *** ** *** * }
* * ** *** * ** * *** * else **** ** * ** *
** * ** * ** **** *** * * * * * ** ** * is ** *****
** * *** }
*** * * **** *** 0;
}
answered by (227 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 like 0 dislike
Hidden content!
* = * ** *** * * ** *** ** ****
* * * - * % 12 == 0:
* * * ** * * * ** *** = ***
** * ** - **** % 12 == 1:
** * **** ** ** ** ** * * = **
* * ** - ** % 12 ==
****** ** ****** *** * ** = * **
* * **** - % 12 == 3:
** ** * * ** ** * = ***
*** ** - * % 12 == 4:
* * ** * * * * ***** * ** = ** **
** * - ** % * * 5:
** * **** * * * *** * = ****
* * *** - % 12 == 6:
* * * * *** * ** * = **
* - * % 12 == 7:
* * * * * ********** = **
* * * - * % == 8:
**** ***** ***** * * * ** = **
* * - * % 12 9:
* * * * **** ** = *
* - * % 12 == *
* ***** **** *** **** * **** * =
**
* * ***** * ** *** = *

** ** ** ** ** ** * ** *
50/100 answered by (183 points)
0 0
prog.c:1:1: warning: data definition has no type or storage class
 year = int(input("Input your birth year: "))
 ^~~~
prog.c:1:1: warning: type defaults to 'int' in declaration of 'year' [-Wimplicit-int]
prog.c:1:8: error: expected expression before 'int'
 year = int(input("Input your birth year: "))
        ^~~
prog.c:3:12: warning: character constant too long for its type
     sign = 'Dragon'
            ^~~~~~~~
prog.c:5:12: warning: character constant too long for its type
     sign = 'Snake'
            ^~~~~~~
prog.c:7:12: warning: character constant too long for its type
     sign = 'Horse'
            ^~~~~~~
prog.c:9:12: warning: character constant too long for its type
     sign = 'sheep'
            ^~~~~~~
prog.c:11:12: warning: character constant too long for its type
     sign = 'Monkey'
            ^~~~~~~~
prog.c:13:12: warning: character constant too long for its type
     sign = 'Rooster'
            ^~~~~~~~~
prog.c:15:12: warning: multi-character character constant [-Wmultichar]
     sign = 'Dog'
            ^~~~~
prog.c:17:12: warning: multi-character character constant [-Wmultichar]
     sign = 'Pig'
            ^~~~~
prog.c:19:12: warning: multi-character character constant [-Wmultichar]
     sign = 'Rat'
            ^~~~~
prog.c:21:12: warning: multi-character character constant [-Wmultichar]
     sign = 'Ox'
            ^~~~
prog.c:23:12: warning: character constant too long for its type
     sign = 'Tiger'
            ^~~~~~~
prog.c:25:12: warning: multi-character character constant [-Wmultichar]
     sign = 'Hare'
            ^~~~~~
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include * ** * * * **

int main(int argc, char *argv[]) {
* * * *** ***** * ** * y, m, d;
****** * * ** * * ***
* * ******* *** * * *** * * *** your birthday ** ** * ** ***
** *** ** * ** *** * * *
*** ** **** **** * ** **** *** * * *** *** &y, &m, &d);
* * ** **** *** * ****
**** * * * * * ** ** == 1){
** * *** * *** * **** **** *** * * < 20 && d > 0)
*** * * **** ** * ** * *** ** ** * ** * **** * * *** * ** * *** * * *** zodiac sign is Capricorn");
*** ***** * * ** ** ***** **** * * * * ** ** * if(d >= 20 && d <= 31)
** * ** * * *** *** * * ***** * * * * *** * * *** * ** *** ** * * * * zodiac sign is Aquarius");
*** ****** * * * * * * * ***** * ** ***
* * * ** * * * * *** * ** * * ***** *** * **** *** * * * * * * * invalid");
*** * *** * ** * *
** * ** * * * * ** if(m == 2){
* * * *** * *** *** * ** * ** ** * ** * < 19 && d > 0)
* *** * * **** * * * ********* * *** *** ***** **** *** ** * * * ** * zodiac sign is Aquarius");
* ** * *** ** * ***** * * ** * * * * **** * * if(d >= 19 && d <= 28)
** ** *** * *** *** * * ** ** * * ** ** * * * ****** ** * * * ** * * * * ** ** zodiac sign is Pisces");
** * * ** * ** * * ** *** * * * * ** * * ** ** *
**** ****** ****** * *** * * ** ** * **** ** * * ** **** * **** *** * ** * invalid"); * *** ** **
* ** ** ****** * *
* * *** * * * * if(m == 3){
* ***** ** ** ** * ******** * * * * * * ** < 21 && d > 0)
**** * * * * ***** * * ** ** ****** ** ** * * ** * ** ***** * * * * **** **** * * zodiac sign is Pisces");
** * * * * * **** * ** *** * ** ** * ** * * **** * * if(d >= 21 && d <= 31)
* * ** * ****** * * * ** **** ** ** ****** * *** ** * ** * ***** **** zodiac sign is Aries");
**** *** ** ** * * * * * ** ** * * *** ** * ** *
* * * ***** *** * * *** ******** **** * * ** * * * * ** * * *** **** * * *** invalid"); * * * * * * * * ****** ** *
** * ** *** * ** ***
* * ** ***** * * * if(m == 4){
* * * *** *** ** * * * * *** ** *** * < 20 && d > 0)
* ** * * ** * ** * * ** * * * ** ** ***** ** *** ******* * ** zodiac sign is Aries");
** * ** * * * ** * * ** **** if(d >= 20 && d <= 30)
* * ** *** ** *** * * * *** **** **** ** * ** * * ** * *** * * * *** * *** zodiac sign is Taurus");
* * ******* * ***** ** * ** **** *
** ****** ** * ** * ** * ** ** * *** *** ** * * * * * * ** * * * ** ** ***** * ** invalid"); * * * ** * * * * * ** * ***** *** * *
* ** * * * * *
***** * **** * * ** * ******* if(m == 5){
*** ** *** * * *** * * * ** * * ***** ** < 21 && d > 0)
** ***** * * * * ** ** ** * ** * ** *** ** **** * **** *** *** * zodiac sign is Taurus");
** * * * * * ** * * * ** * * *** * ** *** if(d >= 21 && d <= 31)
*** ***** ***** * **** ** *** * *** ***** * *** ****** *** ** * * *** * *** ** zodiac sign is Gemini");
**** * *** * * ** ** ** *** *** * *** **** *
* * * * * * *** ******* * ********* ** *** * **** * * ** **** ** *** * * *** ** invalid"); ****** ** * * ** ** * * * *** * *
** ** * *** *** ** ** *
* ** * * ** ** * ** if(m == 6){
** * * * * ** ******* **** ****** * * * * < 21 && d > 0)
* ** * ** **** * ** * * * **** *** ** ** * * * * ** ** ** ** *** * zodiac sign is Gemini");
** ** * ******* * * **** ** *** **** ** * ** if(d >= 21 && d <= 30)
* * *** * ***** * ** * * * * ** * ** * ** * ** * *** ** * * ** zodiac sign is Cancer");
* * *** * ** ** * * ** **** ** ** ** ** * **
* ****** * * ** * ** * *** *** *** ** ** ** * * *** *** ** ** *** * * ** invalid"); ** ** * ** *** * *** ** * * ********* **
* * ** ** ***** ****
** ** * * ** * ** *** if(m == 7){
* * * * *** * ** * * * * * ** * * * < 23 && d > 0)
* * * * *** * ** **** * ****** * ** ** * * * * *** *** ** * ** * * * zodiac sign is Cancer");
*** * **** **** * * * * * ** * * * * ** if(d >= 23 && d <= 31)
* * * * * ** * * *** **** **** *** ** * * * ** ** **** **** ** ** * * ** ***** zodiac sign is Leo");
* *** ** **** * * * ** ** * ** *** ***
* ***** * * ** ** * * * * * * ** ** * **** ** * ** * * * ** invalid"); * * ** * ** * **** ** *** *
** * * * * * ** ** **
********* ** *** * ***** ** if(m == 8){
* * * * ** ** ** * * * ** ***** ** * * *** ** < 23 && d > 0)
* * ** ** *** ** * * * ** * *** ****** * *** **** ****** * ********* ** zodiac sign is Leo");
* ** * * *** * * ** ***** *** * *** * * ** if(d >= 23 && d <= 31)
* * * ** * ** ** ** * * * ** ** ** ** ** ***** *** * * ** ** * * * ** *** * zodiac sign is Virgo");
* * * * * *** * *** * *** * ** **
*** * * * ** * * * ******** ** ** *** * ** **** * * * ** * *** ** **** invalid"); ** * ** * **** ** * * * ** ** ** *
* * * * *** * *** * **
* **** * * * ** * * * ** * * if(m == 9){
* * *** *** ** * *** * * * *** * *** * * < 23 && d > 0)
* * ** ** * **** ** * * * * *** **** * * *** * * ***** ** ** **** * zodiac sign is Virgo");
** *** ***** * **** *** * * *** ** **** ** if(d >= 23 && d <= 30)
** * **** ******** * * * ** *** * *** ** ******** ** * * *** ** * * ** * ** zodiac sign is Libra");
** * ** ******* ****** * * * *** ** * * *
** * **** *** * * * * *** *** * **** * * *********** *** **** ** ** * ** *** invalid"); ** *** * *** * ** * *** * *** *
* * * *** * * *** * * *
*** * ** **** ** * * * if(m == 10){
* **** *** * * ** ** * * * *** ** < 23 && d > 0)
**** *** * * * *** ** * * * * ** ** * * * ** ****** *** *** ** * * * * *** ** * ** zodiac sign is Libra");
* **** * * ** ** * ** * * ** * * * * ** ***** if(d >= 23 && d <= 31)
* * * * ** * *** * *** ** * ** * *** *** ** * * * ** * * * * **** * * zodiac sign is Scorpio");
** * ** * **** *** ** * * * ** *** ** **** ** ** **
* ** * ******* * ***** * *** **** ** * ** ****** * * * ** *** *** ** *** invalid"); * **** **** ** * ******* ** *
** ***** * * ** ** **** *** **
** ** * * *** ***** ** if(m == 11){
* *** * *** ** * ** * * *** * **** ** * *** *** ** *** < 22 && d > 0)
**** * * ** * ** * * *** * ** * *** * *** *** * * * ***** * *** zodiac sign is Scorpio");
*** * ** **** * * *** * *** * * *** ***** * * if(d >= 22 && d <= 30)
* * *** * ** ** **** ****** ** ******* * *** **** ** * * * * * * ** *** * * zodiac sign is * * * *
** * ** ** * * * * ** * ** * ***** **
* * **** * ** * ** ** * * * * **** **** ** ****** * **** * * **** ** * ******** invalid"); * * * * **** * ****** * ** *** **
** *** ** * * ***
* * * * * **** *** * if(m == 12){
* * *** * *** * *** *** ** * * * * ***** * * < 22 && d > 0)
** ** ** ** *** ** ** * ** * ** ** * *** * ********** * * ****** ** zodiac sign is Aquarius");
****** ******* * **** *** * ** *** ** * * * ** if(d >= 22 && d <= 31)
*** *** * ** **** * * * * *** ** *** ****** ** ** *** * * ** * zodiac sign is Capricorn");
* ** * *** ** * ** ****** ********* * * *
** ** *** * ** *** **** * *** ** * ****** * ** ** ** * * * ** * ** * * invalid"); * * * * *** **** **** ** * * **
*** * ** * **** * **
* ** * ** * ****
* * * ** * * * ** * **** * * * ** * * ** *****
** ** * * ****** * ** 0;
}
100/100 answered by (243 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 like 0 dislike
Hidden content!
* * * ** * *
*** ** * * * * *


int main(int argc, char * ** * {
* * **** * ** * * year, month, date;
** ** * ***** ** * ** ** ** your ** ** ** ** ** ***
** * * ** * *** * * **
* * * ** * * ** * * * *** * * * ** *** *** ** *** ** ** * **** * ***
** ***** * ** * *** * ***** == 1 *** * *** * date * **** 19) || (month == 2 * * * ** date ** *** 19))
** *** * * *** *** ** *** * *** zodiac is ** * ** **
** ** * **
*** *** * ** ** * ******* == 2 *** * * ** date * ** 17) || (month == 3 ** *** date * 21))
* **** * **** * ** * ** * * zodiac is ** * *
* * ** * *** * ** *** **
* *** *** **** * * **** * == 3 * * ***** * date ** 19) || (month == 4 ** * * *** * date * 21))
* * *** * * * ** * ** * ** zodiac is * * ** *
* * ** *** * * * * *
***** * ** ** *** *** * * ** == 4 * * *** * date ** 19) || (month == 5 * * date < 21))
** * * *** * ** ***** * ** *** zodiac is ** * * *
* * ** ** * **** *
* * ** * *** *** * ** ** * == 5 **** * * date ** ** 19) || (month == 6 **** ** * * date *** ** 22))
* * * **** *** * ****** ** **** * * * zodiac is **** ** *
* * ** *** * * * *
* * ** * *** *** ** ** * * * == 6 * * ** * * date * * 20) || (month == 7 * *** * * date *** 23))
* * ****** * * * ** * ** * zodiac is * * *** ***
*** **** *** *** ** *
*** *** * * ** **** *** * *** * == 7 *** ** ** ** date * * 21) || (month == 8 * * * ** * date * 23 ))
** ** *** * ** ** * ** ** ** **** ** * zodiac is ** * * *
* ** * ** ** * * **
** * * ** ** *** *** * * * == 8 *** * date * * 21) || (month == 9 * ** **** date **** 24))
* * * * **** *** ** * ** *** zodiac is * * *
* ***** * ** * * **
* ** * *** * ** *** **** * **** * == 9 ** **** * date * ** 22) || (month == 10 * * * date **** * 23))
** **** * ** **** * ** * ** **** * zodiac is *** * * *
** ** ** * * * *
** * *** * * * *** *** * * * **** == 10 * ** date * * 22) || (month == 11 * * * * * date **** 23))
* ** * ** * * * *** ** ** * * zodiac is * *** *** ***
*** ** * ** *** * ***
* **** * * * * *** * * == 11 * ** ***** * date *** 21) || (month == 12 ** ***** * date * 22))
*** *** * * **** * *** *** * * * * zodiac is **** ****
* ***** * ** *
** **** *** *** * ** ** * * ** == 12 * *** * date * * * 21) || (month == 1 * ** * * date ** 20))
* * ** * ** *** ** * * *** * ** ** * ** ** zodiac is * * ** ** *
******* ** * * **** * ****
*** * **** ***** * *** 0;

}
100/100 answered by (254 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include *** * * * *

int main(int argc, char *argv[]) {
* * * *** ** * *** ** y, m, d;
* *** **** * ** **
** ** *** ** ** * * * * *** ****** ** your birthday * ** *** * * **
***** *** * * **** **
* ** ** ** * ** ** * ** * ** * ****** * &y, &m, &d);
* * * ****** * * * *****
** ** * * * *** * ** * == 1){
** ** ** ** * * ** ** ***** ** ** * * ** < 20 && d > 0)
* * ** *** ** ** ** * * * * * ** ** ** * ***** * **** * **** ** ** * * zodiac sign is Capricorn");
** * * ** * * * * *** *** ** ***** * * ** *** * if(d >= 20 && d <= 31)
**** ***** * * * ****** ** * **** * *** **** * ** * **** * * * ***** * ** ** * ** * zodiac sign is Aquarius");
* *** ** * * * ** ** **** ***
** ** * * * ** *** * * * * * ** ***** * * ** * * *** * ***** ** * * ** **** * invalid");
** ** * * ** * * ***** *
* * * * ** * ***** *** if(m == 2){
** * * * *** * * *** ** * * * * *** * * ** < 19 && d > 0)
* *** * ***** * * * * **** *** *** ***** * * * * * * * **** ** * ** ** zodiac sign is Aquarius");
* * * ** * * * * ** * * * * * ******** **** ** if(d >= 19 && d <= 28)
* * *** * *** ** ** * * * * ** * ****** * *** * * * * * * ***** * ** zodiac sign is Pisces");
* **** *** * ** **** *** *** * * * *** ****
* * * * ** * * *** * * * **** ***** ** *** ** *** ** **** ** * invalid"); * ** * ** * *****
**** * **** ****** * ** *
* * * ** * ********* ** * if(m == 3){
** * * * ** * * **** * **** * * * ** ** < 21 && d > 0)
** ****** ** ** ** * *** * * ** *********** * * **** * ** *** * ** * ****** *** * *** zodiac sign is Pisces");
** ** * ** **** *** ** * ******* ** **** * if(d >= 21 && d <= 31)
* * * * ** * ****** ** *** * **** ** **** * ******* * * *** ** ******** ** ** zodiac sign is Aries");
* * * ***** * ** * **** ** * * ** ** ***
* ** * * ** * ** ****** ** * * * * * * ****** **** * * * *** * **** * *** * invalid"); * * ** * ** * ** *** * * * * ** ** *
** ***** *** ****** ** **
**** * * ** * * **** if(m == 4){
* ** ** *** *** ****** ** ** * *** * * **** < 20 && d > 0)
* **** *** ******* ****** * * * ** **** ** * * * * *** *** **** *** * **** ** zodiac sign is Aries");
* ****** ** * *** *** * **** * *** * * ** *** if(d >= 20 && d <= 30)
*** *** * ** * ** ** * ** ***** * * * ****** ** ** * * * * * * zodiac sign is Taurus");
* * * *** * ** * * * * * ** * ** ** ** * *
** * ** * * * * * * ******* * **** *** * ** * ** * * * * ******** ***** invalid"); * *** ** * ** * ** * *** * * * * ******
** ** **** ** * *** * * ** *
* * * ** * ** ***** *** **** if(m == 5){
** **** *** ** ***** * * **** *** * * ** * < 21 && d > 0)
*** ** ** *** ** *** *** *** ****** * *** ** *** * * *** * * **** * **** ** *** * zodiac sign is Taurus");
******** ** * * ** * *** * * ** * ****** *** ** ** if(d >= 21 && d <= 31)
** * * * * ** * * *** * *** * * ** *** * *** ** * * ** * *** * * * * zodiac sign is Gemini");
* ***** * * * * * ** * ** * ** ****
* ** * ******** ** **** * * *** * * * * * *** ** * ***** * ** invalid"); * ** ** ***** * *** *** * * *** ****** ***
** ** * ** * *** * ** *
* **** ** * ** * * ** if(m == 6){
** *** **** *** **** * * * ***** * ** * < 21 && d > 0)
* * * *** * * * * * * *** * * * *** * ** * ** ** ***** * * * * * ** zodiac sign is Gemini");
* * * ** * * * * ********* * * ** * * * ** if(d >= 21 && d <= 30)
** ** ** **** ** * * * ** * * **** * * * ******* ** ****** * * ***** * * **** * zodiac sign is Cancer");
** * ** *** * ** *** * **** * *** * ** ** ***
* ** * * ** * **** * ** ** * *** * * *** * ** ** ** * * * *** * * ****** * *** invalid"); ** ** * *** ** ** * * * * * *
** **** * ** * * * * *** ****
*** *** ** *** * ** ** if(m == 7){
** ***** * * **** ** **** ** ****** ** < 23 && d > 0)
* * * **** *** * * * ** * * * * * * **** * *** * ** * * * * * *** * * * * * **** *** zodiac sign is Cancer");
**** * **** * *** ***** * *** ******* *** if(d >= 23 && d <= 31)
** **** * * ***** **** * * * * * * * *** * ** * **** * * * *** zodiac sign is Leo");
** ** * ** * * * * **** * *** ** *** ***
* ** ****** * *** ** ** *** ** *** * ** * *** *** * * * * *** ** * *** * invalid"); * ******* *** ** * * ** ** *
* * ** ** * * * *
** * ** *** *** **** * if(m == 8){
* **** ** ** * ** ** ** * * ** ** *** * *** ***** < 23 && d > 0)
** ** ** * * **** *** * *** ** * * ** ** * ** ** *** *** * *** *** **** * zodiac sign is Leo");
* ** ** ** *** **** ** ** * * * ** ** ** ** if(d >= 23 && d <= 31)
* * *** ** ** ** *** * ** ** **** * * *** * ** * *** ** ** * **** ** * ****** ** zodiac sign is Virgo");
* **** * * *** ** * * **** *** * ** * ** **
** ** * * ***** * ** * ** * *** * * * ** * * ***** ** * ******* *** * ** invalid"); ** *** * *** * * * ** ***** *
**** *** * ****
** ** * ** ** **** * ** * if(m == 9){
**** ** * ** * ** * * *** ** ** * ** *** < 23 && d > 0)
* ** * ** * ** ******* *** ** * **** *** ** *** * *** **** * * *** zodiac sign is Virgo");
**** * ** * ** **** *** * * ** * *** * if(d >= 23 && d <= 30)
*** * * ** * ** * * ***** ** ** ** * * * * ** * * * ** * ** ** * ** * zodiac sign is Libra");
** *** * ******* *** ** ** * * * * ** ******* *
** * * * ** ** * * * * **** * *** * ** *** * ** ***** * * *** * ** * ** invalid"); * *********** ***** * ***** * * ** * * **
* **** *** ** * *** *
* * ****** *** *** * if(m == 10){
** ** * *** * *** * * * * ** *** **** * * * < 23 && d > 0)
**** ***** * * * * * ****** ** * * *** **** *** * *** *** ** ** ** * * ** ** * * ** * zodiac sign is Libra");
** * ** * *** * **** * * * ** **** *** * * if(d >= 23 && d <= 31)
* * * * * ** * ** * * ** *** * ****** **** * ** ****** * * ** *** ** * * * * zodiac sign is Scorpio");
*** * * * * ***** ** *** * ** ******** **
* *** *** ** * ** ** * * ******* * * * * ** * * **** ** ******* ** invalid"); ** * ******* ** * * ** ****
* **** ** ** * ***
* ** * ** * * ** **** if(m == 11){
* *** * * *** * ***** ** ** * * * * ** * **** < 22 && d > 0)
*** **** * * * * ** * *** *** * ** ** **** * * **** ** * ** * * **** * ** zodiac sign is Scorpio");
* ** ** * * * * ** * * ** *** * * * * * ** if(d >= 22 && d <= 30)
***** ** **** * ***** * ** * *** * *** * **** * ** * ** **** * * ** *** * zodiac sign is * * * ** **
** *** * * * * *** * *** * ***** ** ** * **
** ****** * * ***** * **** ** * ***** ****** **** * ** * * ** * ** ** * * * * invalid"); * **** * ***** * * ***** **
** ** * *** *** ** *****
**** *** * ** ** if(m == 12){
* * **** **** ** * ** **** * * **** * * ** < 22 && d > 0)
*** * ****** *** *** **** ** *** * **** * ** * * * * * ** * * ** ** * zodiac sign is Aquarius");
* * * * * * *** * * * * ** * *** * ** if(d >= 22 && d <= 31)
* *** ** * * ** * **** * **** * * *** * * ** * *** **** ** *** ** ** ** ** ** zodiac sign is Capricorn");
**** * * * * * * ***** ** ** * * *
**** *** ** *** * * ** * * **** **** ** ** * ** ** * ** * * ** * *** *** *** invalid"); * ** * *** ** ******* * * ** *
* *** ** * * ** * *** *
* ***** ** *** * * ** * * *
** ** ******* *** * * ** * * * *** * * * * *** * * * ** * ***
*** * * *** ***** ** * * 0;
}
100/100 answered by (220 points)
reshown by
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 like 0 dislike
Hidden content!
** * * * *
*** * * * ** ** * *


int ** ** argc, char * * * {
******** ** int year, month, date;
** ** *** * * **** ** your ** * * ** *** *
*** **** *
* ** *** *** **** * *** *** * * * * * * **** * *
*** * ** * * * == 1 * * ** ** date * ** 19) || (month == 2 * * * * * * date * 19))
**** * * * * * * *** * zodiac is * * * * **
** * * ** * ** *****
* ** * ***** * * else *** * == 2 **** *** date *** 17) || (month == 3 **** * * date *** 21))
** *** ** *** ** *** * * ** *** is * *** *
* **** * *** * ****** * *
** * * * * * * else *** == 3 * ** * date ** * 19) || * == 4 * ** *** date * 21))
**** * ** ** **** *** * is * ** * *
* * ** *** * ***
* * ** * * * else * == 4 **** **** date **** 19) || (month == 5 * *** * date * * 21))
***** * ** * ** ****** *** * * ** ** is *** * * *
* * * * **** * * * **
* * ** * ** ** * * * * == 5 * * * ** date 19) || (month == 6 * * date *** 22))
** * * ****** *** * ** ** * * zodiac is ** * **
* ****** *** ** ** ***
** * ** * * ** ** *** ** ** == 6 * ****** date ** 20) || (month == 7 **** * * * date ** 23))
* * * ** ** **** ** ***** * * * *** ** is * * ***
* ** * * * * ** ****
* *** * * * ** *** * ** * * * == 7 ** ** * date *** 21) || (month == 8 * ** * * ** date * ***** 23 ))
*** ** *** * * * * ** **** * * *** * is ** * **
** **** * ** * * **
*** ** * * ** * *** * * * == 8 ** * * ** date ** ** 21) || *** * == 9 ** ***** ** date **** 24))
* ** ** ** * * *** * * * zodiac is ** * * *
*** * * ** * * *
* ** *** *** * * ** * * ** * == 9 *** *** * date **** 22) || (month == 10 * ** ** * date * ** 23))
* * * ** ** ** ** ** * * ** * * zodiac is *** ** *
** *** *** ** ** * * **
* * * * * * *** *** * == 10 ** * ** date ** 22) || (month == 11 * * ** ** date ** * 23))
** * ** * * ****** ** * ***** zodiac is ** ** * ****
* * *** **** * * ** * ** * *
** ** ***** *** * * ***** == 11 * * ** date *** 21) || (month == 12 ** * ** date ** * * * 22))
**** *** ** *** ** ******** * ** **** * * is *** ** * *****
*** ** *** * *
* * * * * * * ** * * ** == 12 *** ******* date **** 21) || (month == 1 * * * ** date * * 20))
***** ** * **** ** * * *** ** * zodiac is * * * ** ***
* * * * * * * * *
** * * * * ** * ** ** ** * *** * *

}
answered by (220 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 0
-----------Re-judge-----------
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 like 0 dislike
Hidden content!
#include * * * *
#include *** * * * *
int main(int argc, const char * argv[])
{
int date;
int month;
char ans;
* ** *** *** your birthday * * ***
*** * *** ** ** **** *** * **** * ***

if ** *** ** * * *** * ** * * * * * * ** * * * * * ** * **** * * * ** * * ***** *** **
* **** *** ** Zodiac Sign is * **** * ***
}
else if * *** **** * * * ** * ** *** * * * * * * ** * * ** ** ** * * ** * *** *** * ** **** {
* ** * ****** Zodiac Sign is * * * ***
}
else if ** ** * ** ** * * * ** **** * * * * *** ** * * ** * * * ** * *** **** month==4)) {
* * **** * * Zodiac Sign is * **
}
else if ** ****** * *** * * ** * * ** ** * * * ** * **** *** * * * ** * * * * {
* * *** Zodiac Sign is * ** *
}
else if *** *** ** * *** **** ** * * ** **** * ** * ** * * ** * * * ** * * * * * {
*** ** ** ** Zodiac Sign is *** * * **
}
else if * **** **** ****** *** * ** * ** ***** * * ** **** *** * ** * ** ** * ** * * * ****** ** ** {
* * * * ** Zodiac Sign is ** *
}
else if * * * ** * **** * ***** * ****** * ** * * *** * ** * *** *** * ***** * * *** * * * {
* * * * * * Zodiac Sign is * * ** ***
}
else if *** * *** * * * ** * *** *** * * * * * ******* **** ** * ** ** * * ***** ** *** {
** *** ** ***** Zodiac Sign is ** * *****
}
else if *** ** * **** * * * ** ** * *** * * * * * * * * * * ** *** * * * * **** ** *** {
* * **** ** Zodiac Sign is * **
}
else if *** * * * *** * *** **** * * * * *** ** * * *** * ** * *** ** ** *** *** * ** {
* ****** *** * Zodiac Sign is *** * *
}
else if * * ** *** * ** * * ** * **** * * ** * * * ** * * * * * * ** * * * ******* {
***** ** ** *** Zodiac Sign is ** *** ** * *
}
else if * * **** * * * ***** * * * * **** * ** ** * * *** ** * * * * ** * *** ** **** * ** ** {
* ***** * * * Zodiac Sign is * *** *******
}

* * * * * ***
return 0;

}
100/100 answered by (283 points)
edited by
0 0
prog.c: In function 'main':
prog.c:8:8: warning: missing terminating " character
 printf("Input your birthday (YYYY/MM/DD));
        ^
prog.c:8:8: error: missing terminating " character
 printf("Input your birthday (YYYY/MM/DD));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:10:1: error: expected expression before 'if'
 if ((date>=20 && date<31 && month==1)||(date<=18 && date>=1 && month==2)){
 ^~
prog.c:49:1: error: expected declaration or statement at end of input
 }
 ^
0 0
prog.c: In function 'main':
prog.c:8:8: warning: missing terminating " character
 printf("Input your birthday (YYYY/MM/DD));
        ^
prog.c:8:8: error: missing terminating " character
 printf("Input your birthday (YYYY/MM/DD));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:10:1: error: expected expression before 'if'
 if ((date>=20 && date<31 && month==1)||(date<=18 && date>=1 && month==2)){
 ^~
prog.c:49:1: error: expected declaration or statement at end of input
 }
 ^
0 0
prog.c: In function 'main':
prog.c:11:1: warning: implicit declaration of function 'prinf' [-Wimplicit-function-declaration]
 prinf("Your Zodiac Sign is AQUARIUS");
 ^~~~~
prog.c:13:1: error: expected '}' before 'else'
 else if ((date>=19 && date<31 && month==2)||(date<=20 && date>=1 && month==3)) {
 ^~~~
prog.c:16:1: error: expected '}' before 'else'
 else if ((date>=21 && date<31 && month==3)||(date<=19 && date>=1 && month==4)) {
 ^~~~
prog.c:19:1: error: expected '}' before 'else'
 else if ((date>=20 && date<31 && month==4)||(date<=20 && date>=1 && month==5)) {
 ^~~~
prog.c:22:1: error: expected '}' before 'else'
 else if ((date>=21 && date<31 && month==5)||(date<=20 && date>=1 && month==6)) {
 ^~~~
prog.c:25:1: error: expected '}' before 'else'
 else if ((date>=21 && date<31 && month==6)||(date<=22 && date>=1 && month==7)) {
 ^~~~
prog.c:28:1: error: expected '}' before 'else'
 else if ((date>=23 && date<31 && month==7)||(date<=22 && date>=1 && month==8)) {
 ^~~~
prog.c:31:1: error: expected '}' before 'else'
 else if ((date>=23 && date<31 && month==8)||(date<=22 && date>=1 && month==9)) {
 ^~~~
prog.c:34:1: error: expected '}' before 'else'
 else if ((date>=23 && date<31 && month==9)||(date<=22 && date>=1 && month==10)) {
 ^~~~
prog.c:37:1: error: expected '}' before 'else'
 else if ((date>=23 && date<31 && month==10)||(date<=21 && date>=1 && month==11)) {
 ^~~~
prog.c:38:37: error: expected ')' before ';' token
 printf("Your Zodiac Sign is SCORPIO";
                                     ^
prog.c:49:1: error: expected declaration or statement at end of input
 }
 ^
prog.c:49:1: error: expected declaration or statement at end of input
0 0
prog.c: In function 'main':
prog.c:11:1: warning: implicit declaration of function 'prinf' [-Wimplicit-function-declaration]
 prinf("Your Zodiac Sign is AQUARIUS");
 ^~~~~
prog.c: At top level:
prog.c:47:2: error: expected identifier or '(' before 'return'
 }return 0;
  ^~~~~~
prog.c:49:1: error: expected identifier or '(' before '}' token
 }
 ^
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 like 0 dislike
Hidden content!
* ** * * ** **
* *** ** * * *


int * argc, char * ** {
** * ****** int year, ** date;
* * ** * * ** *** your *** * ** * * **** **
* **
* *** * * * ** ** * ** ** *** * *** * ** * * * * *** ***
***** * * * ** == 1 *** ** * * date **** 19) || * == 2 ** * ** * date ** * 19))
* * *** * * * *** zodiac is * * * ****
* * * * ** * **
* * ****** else * **** == 2 ** *** * date *** 17) || ** == 3 ****** date * 21))
******* ** ** * * *** * **** * * * * is * ** **
** * ** *** * *
* * * ** ** else *** == 3 *** * date **** 19) || (month == 4 * * * * date * * 21))
** * * **** * * * *** ** * ** ** * * is * **** *
* ** * **
* ** ** * else * * * == 4 * * * * date *** 19) || (month == 5 * * * ** date * * 21))
*** **** ** * ** *** ** * * * *** zodiac is *** **** *
**** *** * * * * * * *** *
* ****** ** *** ** * ** * ** * == 5 * * * * date ** 19) || (month == 6 **** * ** date * 22))
** ** * * **** ** ** * *** * ** *** zodiac is ** *
** **** ** * * *** *
**** * **** * * ***** * *** == 6 ** *** date ** 20) || * == 7 ********** * date *** * 23))
** * * * * *** ******* *** ** * * * ** is **** ** *
******* * ** **
****** * **** * ** * ** *** ** ** == 7 * ******** date * * * 21) || (month == 8 * ** date * 23 ))
* * * ** * *** * ** * * * zodiac is *
* *** * ******** * ** *
* ***** *** * ** * ** *** ** * == 8 * ***** date ** ** 21) || ** * == 9 * ** * * date **** 24))
** * * ***** * * **** * **** * * *** * is * * *
** ****** * ****
*** *** * * * ** * * **** *** * == 9 * * *** date * ** 22) || (month == 10 * **** date *** * 23))
** * **** * *** * * * * *** ** * zodiac is * ******
* * * * ***** ** **
**** *** * ** * * * * ** * ** == 10 * * *** date * * * 22) || (month == 11 * ** * date ** ** 23))
* ** **** *** * ** ** ******* zodiac is *** * **
*** * * * * * * * ** **
* * ** **** ** * *** * *** * * == 11 ** **** *** date * 21) || * * == 12 ** * * * date * * 22))
* * * * * ****** * * **** * ***** * zodiac is * ** * ** **
** **** * ** **
* * * ** * ** * * *** *** ** ** * == 12 ** **** date * * 21) || (month == 1 *** * * * date * * 20))
**** * ** * ***** *** * * *** zodiac is * **** ** * *
** * ** ** ** ** * ** *
*** * * ***
}
answered by (220 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 like 0 dislike
Hidden content!
* * *** *** *** * *
* ** * ****** **


int ****** argc, char * * {
** * * int year, * * date;
*** * * ** * ** your * ** ** * * **
** * ** ** *
** ** * ** * *** * *** * * *** * * * * * * * * *** *
* *** ** * ** == 1 ** * * ** date * * 19) || ** * == 2 **** **** * * date ** * 19))
* * * ** * * * ** * zodiac is ** **
* ** *** * ** ** * ** * *
** *** ** * else ** * == 2 ** ***** date * 17) || **** == 3 * ** * * date * ** 21))
* * * ** ** * ***** **** **** * is * ** * ****
**** * **** ** ** * *
* * * ** ***** else *** ** == 3 * date * 19) || (month == 4 *** * * date * ** * 21))
* * * * * * ** * ** * ** * * * is **** * *
* * * ** * * ** *
* *** *** * * * ** else *** ** == 4 ** * * ** date ***** 19) || (month == 5 * ** date * * 21))
** * ** * * ** *** **** ***** * zodiac is ** ** *
*** ** ***** * ** **
* * *** ** *** * *** *** * == 5 * * * * ** date *** 19) || (month == 6 * * *** ** date ***** 22))
** ** ** * * ** ** * **** zodiac is * * ** *
***** * *** ** **
* * ** * ** **** * ** *** == 6 * * * * ** date * 20) || * == 7 *** ** date * 23))
** ** ** **** * *** * * ** * **** * is *** **
* * * * *
*** * ** * *** * == 7 ** *** * date *** * 21) || (month == 8 ** * * date * ** * 23 ))
** **** *** * ** * * **** * ** * * * zodiac is ** **
** * ** * *** *** * * *
* * ** * ***** **** * * * * * == 8 *** ** *** ** date ***** 21) || ** == 9 *** ** ** date * * 24))
* ** * ******* * * * * * * * * * * *** * is * * *
* ****** ** * *** *****
** * * * ** * * ** ** * *** ** == 9 ** ** * * date * * 22) || (month == 10 * ** * date * 23))
* **** ** * * * ******* * *** * * * zodiac is * *** * *
*** * * * *** ** *** **
* ** * **** *** * * ** *** ** * == 10 ** ***** * ** date * 22) || (month == 11 * * * * date 23))
** *** ** ** * ** ****** * * ** **** zodiac is * * ** **
* * * * * ** ** *** * **
** * ** * * ***** * * * == 11 ** * ** date * * 21) || == 12 ** * * date * * * 22))
* * * * **** * * ***** ** zodiac is ***** ***
** * * ** *****
** * *** * * * * **** * * * *** == 12 **** ** * * date *** 21) || (month == 1 ** * ** **** date * ** 20))
* *** * * ** **** ** *** * * * * zodiac is ***** * ** *
* ** ** * *** ****** ****
** * *
}
answered by (220 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.71.254.133
©2016-2024

Related questions

0 like 0 dislike
14 answers
[Exercise] Essay (Open question) - asked Nov 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 30244 - Available when: Unlimited - Due to: Unlimited
| 482 views
0 like 0 dislike
24 answers
[Exercise] Coding (C) - asked Nov 2, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 30241 - Available when: Unlimited - Due to: Unlimited
| 948 views
0 like 0 dislike
17 answers
[Exercise] Coding (C) - asked Oct 27, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 29618 - Available when: Unlimited - Due to: Unlimited
| 919 views
1 like 0 dislike
23 answers
[Exercise] Coding (C) - asked Oct 20, 2017 in Chapter 3: Branching, Looping and Functions by nat236919 (5.9k points)
ID: 28130 - Available when: Unlimited - Due to: Unlimited
| 1.3k views
12,783 questions
183,443 answers
172,219 comments
4,824 users