0 like 0 dislike
請設計一個程式,使用者輸入一個整數,程式會判斷該數是奇數還是偶數

 

輸入範例1:

10

輸出範例1:

even

輸入範例2:

99

輸出範例2:

odd
[Normal] Coding (C) - asked in 2016-1 程式設計(一)AC by (18k points)
Available when: Unlimited - Due to: Unlimited
| 243 views

49 Answers

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




* ** * **

{
** a;
* ** * * * *** * * * *
(a % 2 * ** ** * * ** * *
* * * ** *** * * ***




























* **


*
answered by (-276 points)
0 like 0 dislike
Hidden content!
**** *** ****
**** * * * *** **** *** ***

int

{

int a = 0;
*** * * *** * ****
** * == 0){
* * * ** * *** * *** * *

else{
* * **** ***** * * * * *

}
******* 0;



}
answered by (-140 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>



int main()

 {
***** * * * *** *** * ** * *** a;
* * * * * ** * ** * * *** * * * * * ** * **
* * ** * * ** ** ** *** *** * ** *
**** *** ** * * ** * ** * ** * *** * * * * ** *** * ***
** * * *** ** ** * * *** ***
**** ** * ** * ** * * ** * *** *** ** * * **** * * **

 }
answered by (-90 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<stdlib.h>



int main()

{
* * *** * * * ** * * * **** a;
** * * ** * ** * ** ** * * *** *** *
* ***** * * ** * * * *
* ** * * * ***** * ** ****
* * * * * * ** * ** * ** * *** ******* ****** *
** * ** * * ***** * ** *
* * ***** * * ****** **

*** ** *** *** ***** ** **** * *
** ** * * ******
**** ** * *** * **** ** *** *** * * * **
* * * **** ***** 0;

}
answered by (-124 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include * * ** ****



int main()

{
** * * * ** i;
***** * *** **** * ** * * *** &i);


* *** * * ******* * * * % 2 != 0)


* * * ******* **** * * * * * **** * *** *** *** ***** * **


* ** ** * ******* *
*** ***** ** * ** *** * * * ******* * * * * * *** * *
* **** * * ****** * 0;

}
answered by (-114 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>



int main()

{
* * * *** * * ****** num;


*** ** *** * ***** ** **** *** *** * *


* *** ** * * * * **** ****** * **** * % 2 != 0 )


* * ** * * **** * * * ******** * * * *** * * **


******* *** * * * * * ***** *


* * * ** * ***** *** ** ** ** ** * * * **** *





















}
answered by (-383 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>



int main()

{
* * ** * * ** * *** num;


* **** * **** ******* ** *** ** * *** * * * **


* * * ** * *** * * * ** * ** ** ** * * ** * *
** **** * * * * * ** *** *
* **** * * * ** *** * * ** * ** **
*** *** ** * * * ** **

  else
* **** ** * ****** * *** *** * ** ** *
* ****** ** *** * * * ** ** ** ** *** * * ** * ** * *


* *** **** ** * * * * * ** ** * * * * **

















}
answered by (-383 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>



main()

{
* ** ** * *** * * ** num;


* ** * **** ** ** *** * ** ** ** * *


** ** ** ** * ****** * *** ** ***** * **** ** **** *
** ****** ** *** * * ****
*** * *** * * ** ** ****** * * ** *
*** * **** * * ** * * *

  else
* *** * * * * *** * *
*** *** * * * ** * ** * * *** * * * * * ***** * * * * *


* * ***** * * ** **** * * ** * ** **

















}
answered by (-383 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>



int main()

{
* *** *** ** * * **** * a;
**** *** * ** * ** * * * * * * *** **


** * ** ***** * ** (a % 2 == 1)
** * * * ** * *** * **** ** * ** ** * ** ** * ** ** *
* * * ** * ** * *** ** *
** * *** ** * ** * * ** **** * ***** ** ** **** ** ** *







}
answered by (-162 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>



main()

{
**** *** *** *** ** ** a;
** * * *** * * ** * * * * ***** * ******


*** * ****** * * ** ** * (a % 2 == 1)
* * *** *** * * * *** * *** * * * ** * * **** *
** * ** * ** * ** *
* ** **** ** ** * ** * **** * *** * *** * * * *







}
answered by (-162 points)
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:162.158.78.150
©2016-2020

Related questions

0 like 0 dislike
35 answers
[Normal] Coding (C) - asked Oct 13, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: Unlimited - Due to: Unlimited
| 281 views
0 like 0 dislike
43 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: Unlimited - Due to: Unlimited
| 293 views
0 like 0 dislike
39 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: Unlimited - Due to: Unlimited
| 236 views
1 like 0 dislike
42 answers
[Exercise] Coding (C) - asked Oct 27, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
Available when: 2016-10-27 18:30:00 - Due to: 2016-10-27 21:00:00
| 216 views
10,155 questions
107,058 answers
92,558 comments
3,252 users