1 thích 0 k thích
8.6k đã xem

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) - đã hỏi trong Chapter 3: Branching, Looping and Functions bởi (5.2k điểm)
ID: 28184 - Xem được từ: Không giới hạn - Hiệu lực đến: Không giới hạn

đã sửa bởi | 8.6k đã xem
0 0
should I write all zodiac?

23 Trả lời

0 thích 0 k thích
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 trả lời bởi (227 điểm)
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 thích 0 k thích
Hidden content!
* * * * ** ***
**** ** *** *** * *

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

int ** * argc, char * ** {
** * * * * *** int * ***
** * * * * ** * your ** * *** ** *
** ** * * ** *** * * * * ***
* * * * ** * **** * *** **
* * ** ** * ** * ** * * * * ** * * ** * is *** *****
*** * * * * * * *
* * * * ** * * ** }
** ** * ** * * ***** *** ** else * *** ** **
** * * ** * ** ** ** *** * ** * ** ***** *** *** is * ** *
* * * * }
* *** * * * * 0;
}
trả lời bởi (227 điểm)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 thích 0 k thích
Hidden content!
= ** * * ***** ** * * * ** * ***** * *
* *** - % 12 == 0:
** * * ***** * ** **** * = * *
* * * * - ** % 12 == 1:
* **** * * * * ** ** ** = * * *
*** * *** - % 12 == *
** * ** * ******* ** = **
* * - ** % 12 == 3:
*** * * ** * ** * * * ** = **
* ** * - ** % 12 == 4:
* ***** * * *** * ** = ** ***
** * - ** % * * 5:
* *** * * * * *** * * *** = * *
* * ** - * * % 12 == 6:
* **** ** * * * = *
** * - *** % 12 == 7:
** * * * * ** ** ** **** = *
* - % == 8:
**** **** ********* * * * * = *
** * - ** % 12 * 9:
**** **** *** * **** ** * * ** = *
* * - * % 12 ==
* ** **** **** *** = *
*
** ** ***** * ** * * ** = * *

***** *** ***** * * * * * **
50/100 trả lời bởi (183 điểm)
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 thích 0 k thích
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 trả lời bởi (243 điểm)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 thích 0 k thích
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 trả lời bởi (254 điểm)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 thích 0 k thích
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 trả lời bởi (220 điểm)
hiện lại bởi
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 thích 0 k thích
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 **** * *
**** ** * * ** *** * *
** * * ***** ** ** * * ** ** * ** *

}
trả lời bởi (220 điểm)
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 thích 0 k thích
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 trả lời bởi (283 điểm)
đã sửa bởi
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 thích 0 k thích
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 ** ** ****** *
* * ** *** **** **
*** ** * **
}
trả lời bởi (220 điểm)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
Case 4: Wrong output
0 thích 0 k thích
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 * ** * ** **
** * * * * *** ***
** * ****
}
trả lời bởi (220 điểm)
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:108.162.241.96
©2016-2026

Những câu hỏi liên quan

0 thích 0 k thích
14 trả lời
[Exercise] Essay (Open question) - đã hỏi ngày 2 tháng 11 năm 2017 trong Chapter 3: Branching, Looping and Functions bởi nat236919 (5.9k điểm)
ID: 30244 - Xem được từ: Không giới hạn - Hiệu lực đến: Không giới hạn
| 3.3k đã xem
0 thích 0 k thích
24 trả lời
[Exercise] Coding (C) - đã hỏi ngày 2 tháng 11 năm 2017 trong Chapter 3: Branching, Looping and Functions bởi nat236919 (5.9k điểm)
ID: 30241 - Xem được từ: Không giới hạn - Hiệu lực đến: Không giới hạn
| 7.1k đã xem
0 thích 0 k thích
17 trả lời
[Exercise] Coding (C) - đã hỏi ngày 27 tháng 10 năm 2017 trong Chapter 3: Branching, Looping and Functions bởi nat236919 (5.9k điểm)
ID: 29618 - Xem được từ: Không giới hạn - Hiệu lực đến: Không giới hạn
| 6.2k đã xem
1 thích 0 k thích
23 trả lời
[Exercise] Coding (C) - đã hỏi ngày 20 tháng 10 năm 2017 trong Chapter 3: Branching, Looping and Functions bởi nat236919 (5.9k điểm)
ID: 28130 - Xem được từ: Không giới hạn - Hiệu lực đến: Không giới hạn
| 7.4k đã xem
12,783 câu hỏi
183,442 trả lời
172,219 bình luận
4,824 thành viên