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

 

輸入範例1:

10

輸出範例1:

even

輸入範例2:

99

輸出範例2:

odd
[Normal] Coding (C) - asked in 程式設計(一)AD by (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 39 views

21 Answers

0 like 0 dislike
Hidden content!
#include<stdlib.h>

#include<stdio.h>



int main()

{
* * * ** ** **
* ** * * * ** * *** * * * a,b ;

    
** ** * ****** **** * ***** ** * ** * ** , &a);


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


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

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

    

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

#include<stdlib.h>

int main()

{
****** *** ** *** * a,b,c;
* *** * ** * *** ***** **** * ** ***
** *** * * ****** * ****** * **
* ***** * * * * * *** *** * ** **** * *
* * * ***** * *** *
* ** * * * * ** * ** * * ** ******* *
** * * * * * ** * * ** * * ** * * *** ** * ** **
** ** * ** *** ***** 0;
**** **** *** **********

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

#include <stdlib.h>



int main()

{
*** * * * * * x;
*** * *** * ** *** ** ** **
* *** * ***** * ** **
*** *** * ** * * * ** **** * * * * * * * * ** **
***** ** * *
**** * ***** * ** ** * * **** * * * **** *


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

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

#include <stdlib.h>

int main(void) {
** * ** ** * *** i;


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


***** * * * * * ** EXIT_SUCCESS;

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

#include <stdlib.h>

int main(void) {
* **** **** * * *** * i;
** *** * ** * ** ***
* * * * * ** ***
* ** ** **** ** * * * * * * *** * ***** ** ** ** **
* * * ** * ** **** *** * * * * * * * ** ** ******* ** *** *****
* ** * * * *** ** ********** ** *** ** * * * * ******* ***
* ** *** * * ** * ** *
* *** * ***** * * ** *** EXIT_SUCCESS;

}
answered by (-38 points)
0 like 0 dislike
Hidden content!
int main(void) {


*** * * *** ** ** ** i;
** * **** ** * ** *** * ** * *** * * * * ***
* * * ** ** * * ** ** * ** * ***
* ** ** ** * * * * * * ** printf("odd");
** ** **** ****** * * **** *** EXIT_SUCCESS;

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

#include * ** * ** **



int main()

{
* * *** ** *** **** *** num;
* * * * **** * *** ** *** ** * * * &num);
*** *** ***** ** * ((num % 2) == 0)
*** * ** ** * ***** * *** ** * ** *** ** * * * **** * *
* *** * ** * *******
** * ** ** * *** ***** ** **** * * ** ** * * ** ** **


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

}
answered by (-214 points)
0 like 0 dislike
Hidden content!
#include * * ** ** *

#include * ** ** *



int main()

{
* ***** ***** *** ** * *** num;
* * ** * *** * ** ** * **** * ***** * &num);
* * * * * ** * * *** *** (((num % 2) == 0) && (num != 0))
****** *** ******* *** *** * * * *** ********* ******** *** **
* ** ***** * * * **
** ** *** * * *** * * * * * ** ** ** * * ** * *** ** * * * *


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

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

#include ** * * *



int main()

{
* ** ** *** ** * i;
* ** *** * * * * * ** * * *** * * *
* ****** * * * * * * **
** ** ** ** ** * * ***** * * *
** ** *** * *
* * *** * * * * ** * ***** *****
* *** *** * ** ** 0;

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



int main()

{int A;
** ** ****** ******
* **
** ** * * *** ** **

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

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

Related questions

0 like 0 dislike
21 answers
[Normal] Coding (C) - asked Oct 13, 2016 in 程式設計(一)AD by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 56 views
0 like 0 dislike
23 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 程式設計(一)AD by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 49 views
0 like 0 dislike
54 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 程式設計(一)AD by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 38 views
0 like 0 dislike
39 answers
[Exercise] Coding (C) - asked Oct 27, 2016 in 程式設計(一)AD by Shun-Po (17.9k points)
Available when: 2016-10-27 18:30:00 - Due to: 2016-10-27 21:00:00
| 24 views
0 like 0 dislike
60 answers
[Exercise] Coding (C) - asked Oct 13, 2016 in 程式設計(一)AD by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 49 views
2,964 questions
57,158 answers
28,936 comments
938 users