Toggle navigation
Courses
Questions
Tags
Users
AC 20161102 作業2
1
like
0
dislike
4.3k
views
請設計一程式,使用者會輸入三個正整數,請找出其中最大及最小的數然後輸出。
請利用函數的方式來完成這個作業
[Exercise]
Essay (Open question)
-
asked
Nov 2, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 16865 -
Available when:
Unlimited
-
Due to:
Unlimited
|
4.3k
views
comment
0
4
Called for Help
Please
log in
or
register
to add a comment.
48
Answers
0
like
0
dislike
Hidden content!
#include<stdio.h>
#include<stdlib.h>
int X1(int num,int num2,int num3);
int X2(int num,int num2,int num3);
int main()
{
int num,num2,num3;
* * ** * ** ** ***** *** ** *** * **** **
* ** **** * * ** * * ** *** ** ***** ** * *
* ****** * * ** ***** ****** * * * ** ** *** *
printf("%d %d",X1(num,num2,num3),X2(num,num2,num3));
return 0;
}
int X1(int num,int num2,int num3)
{
** ** *** ** * * * * ** *
* *** *** ****** * ** ** * ** ** * * * * *** *
*** **** * * ** * ** ** * * * **** * * ** ** ** ******* **** * * * * *
**** **** ** ***** ** *** * * * *** * * ** ** * * *** **** ** ** ** ******* * * * * *** ** num;
* * ***** * * * * *** * ***** ** * * * * * **** * * *** ** ** * * * *
***** * * ** ** ** ******* * ** *** *** ******* ** *** * * ** * * ** ** * num3;
***** ***** *** * ** * ** **** ** *** *
else if(num2<num3)
* * * **** * * ** * ** **** * *** **** **
** * * *** * ** * *** **** ** ** * * ** * ******** *** **** **** *
** **** *** * * * *** * * * ******** * * * *** **** ** * * * ***** ** * * * * *** * ** * num2;
*** * * ***** *** * * **** ** **** *** ** * *** *** * ** **
** * * * * ** * ** * * ** **** * *** ** * * * * *** ** ***** ** ** * ** ****** ** * * num;
* * *** * ** * * * ** * * **** *** *
else
{
* * ***** * * * * ** * *** ** * ***** ******* ** *
** *** ** ** *** * ** ** ******* * ** * * * ** *** * * num3;
* * **** ** **** * ** *** ** **** ** * *
** * * *** *** * ** *** ****** *** * * ** * ** **** *** * * ** * * ** * num2;
}
}
int X2(int num,int num2,int num3)
{
* * *** *** * * **** * * ******
* * ** * * ** ** * * *** ** ** **
*** ** ** *** * *** * **** * ** **** *** **** * * * * ** **** ** ** *** ********
* * ****** * ** * * ** ** * ** ** * * * *** * * *** ** *** * * * **** *** * **** num;
* * ** ** * ** ** * * * * * * *** * * * *** * *** * ** ** * * * * * *
* *** *** * * ** * * * * * * ** * * * **** * * ** * * ***** * ***** *** * * * * num3;
* * ** ** * ***** * * * * *
else if(num2>num3)
**** * * *** * * * * ** ** ** ** ** * * *
*** * ** * * **** * ** ** ** ** ** *** ** ** ****** * * ** **** *
** *** * * * ** ******* *** * *** ** * ** *** * ** *** **** *** ** * ** ** * *** * * num2;
* * * **** * *** ** * * ** * * * ** * * ** * *** * *** *** * * ** * *
** * * * ** * ** ** *** * ******* * * *** ** * ** * ** * * **** * * * ** * ** * * num;
** * * *** * ***** ** ** * ** * ****
else
{
* * * * * * ** *** * ** ******** *** * ** * * ** ** **
* * **** * *** * * ** * * ****** ** * * *** * * *** * ** ** * num3;
* * *** *** * *** ** ** * * ** ** **** ** ***
* * ***** ** * ***** *** ***** *** ** ** ******* * * * **** * * num2;
}
}
answered
Nov 29, 2016
by
Jim870729
(
-102
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * *****
* *** **** * **
* * * * *
int * (int ** *** * * *
{
** * * num2 *** num3)
* * num3;
else
*** **
}
int ** * * (int * ** * ** *
{
* *** * * * num2 ** num3)
***** * *
*
** ** *
}
int *
** * * ** * *
***** ***** ** ** ** * * ** * **
*** *** * **** ** * ** *
* ** * ** ** ** ***** *
* * * ******* ** ** ** * ** numb, ** *
** * * ** * * *** * ** * **
** * 0;
}
answered
Nov 29, 2016
by
410523034
(
-120
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
int main()
{
* * * *** ** * **** ** * * i, j, k, max, min;
*** ** * **** * ** ** *** *** ***** &i);
*** * *** ** * * * * * * * ** * &j);
** **** ** ** * * ** *** *** * * * * *** &k);
* * * ** * * *** * * **
{
*** ** * *** ** * *** ** ** ** * *** ** ** * *** * ****
}
* * ** * ** * *** *
***** ** ** * * *** * **
** * ****** ** * * * *** * ** **** * * * ***
* * * *** * * ** * *
******** ***** ** * ** ** **
** * * * **** ** ****
* * * * * ** ** ** ****** * **** * *** * ** * *
* ****** * ** * ** * **
* * ** *** * * ** * * **** *
*** * ** * *** * *
* * * *** * * * ** ** * ** ** * * **
**** ** * ***** * ** *
* * * * ** * * * * *
** ** * * * ** * ***
* ** ****** * * * ****** * *** * * **** **
}
** * * *** * *** * * *
{
* ** * * ** * ** ** ** * ** * ** ** * * **** * *** *
}
* *** ** * ** *** * * ** * ", max);
* *** ** ** * * **** *** * * * * *** * * * min);
** ******** ***** * ** 0;
}
answered
Nov 27, 2016
by
410523012
(
-158
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
int main()
{
* * * * ** ** * ****** i, j, k, max, min;
*** *** * *** * ***** * ** ****** &i);
* * ** * * ** * * * *** * * **** *** * ** &j);
* ***** **** * * ** * * ** * ** * * &k);
* * * * * **** **** ** *
{
* ** *** * ****** ** * ** **** * ** **** * * ** * *
}
** * * ***** ** *****
*** ****** * ** *** ** * *
*** ** **** *** ** ***** * *** ** * ** * *** ** *
* ** * * ** * ** *******
*** ***** ** * ** ****** *** *
* ** **** * *** *
*** * * * * * ** **** * *** * * * ** * **
* * * ** *** ** * **
** * * ** * ** * * ***** * *
** * * ** **** **
* **** ** * * * * **** ** *** ** * *** * ** * *
*** ** ** * ** ** * *
* * * ** *** * * * ** *
* * * * * ***** *****
* ** * * ** * *** ** **** *** * * ** ******
}
** * ** *** *** ** * ******** *** *
{
* * * * *** **** ** * * * * *****
}
** ** * *** ** * * * * * * ", max);
* * * **** * * **** *** * ** ** * min);
* ** * ** * ** ** ** * * * 0;
}
answered
Nov 27, 2016
by
410523012
(
-158
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
#include<stdlib.h>
int f(int ,int,int);
int main()
{
**** ** * * *** **** * ** * *** a,b,c;
* ** * * ** * ****** %d * * *** * * *** * * ** **
* * ******** ** **
******* * ** * * ** * * ** *** 0;
}
int f(int a,int b,int c)
{
** * * *** * *** max,min;
* ** *** ***** ***** *****
{
* *** *** *** * * * * ** *
** ** ** ** * ****** ***
}
* *** * * ** **** * *
***** * * * * * * ** *
* * *** * ** * ***** * **** *
* * * * ** *** *** * * * * * ***
* * *** * * * * ******
* *** *** * *** ** * * ***
**** * * ** * * **** ** * *
* * * ** * ** *** **** **
* *** * * * **** ****
*** * *** *** * ****** * *** **
* * * * * ** * * ** * *
** * *** *** * * *
* ** * ** ** ** ** ** ** *
* * * ** ** * * ** **** ** ** * ** **
* * **** * * * *** * * **** *** ** * * * * * *
}
answered
Nov 26, 2016
by
李奕叡
(
-143
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
#include<stdlib.h>
int main()
{
** * ** a,b,c,max,min;
* * * * * ** *** ** * * * %d ** *** * * **** * * ** **
** ************ * * *** * ***
{
****** *** * *** ** * * * * **
* *** ** * ** *** * * *** ***
* * ** **** * * ** ***
* ** * ****** * ** * *
{
** *** ** * * * ** * * **
*** * ** ** ** ** *** * *
}
* * ***** ** *** ***** ** * * *
**** ** * * * * * ****
* *** * * ** * *
** ** * ** * * * * * ***
** ** * **** * * ** * * ** * **
* * * ** ** ** * **
**** ** ** * *** * * * ** *
* ** *** ** ** * * **
* ******* ** ** ** ** * * * ** * *** ** * **
* * * * * ** ** **** *** *
** * ** * *** ** * **** 0;
}
answered
Nov 26, 2016
by
李奕叡
(
-143
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
int ffff(int fa,int fb,int fc,int fx){
if(fx==0){
*** **** * * * ** * * * ******** ** ** ** * *** * ** || fc>fa){
**** * ** ** * * *** * ** *** **** * *** ** * *** **** ******
* ***** ** *** ** ** * * ** ** **** * ** ** ** * * ** ******* ** ***** **** ** * * ** * * * * * * * * fb;
* * * * * * **** *** * * * ***** ** ** * **** ***** ** ***** ****
* * * *** * * * *** ** *** *** ****** * ** * *** * ******* * * * *
* * * * * * * ** **** * * ** ** **** * ** **** *** * ** ** ** ***** * ** * * fc;
** * *** * ** ** ** * * * *** * * * ** * ** * * **** * * ***
* * * ** ** **** * * * * * * ** * * **
*** ** *** *** ** * * ******* ** ** *******
** * * *** * **** * *** *** **** * * **** ** ** * * * fa;
* ******* **** * *** * ** ** * *** **
}
else{
*** * *** ***** ******** ** ** ** * ** * *** **** * || fc<fa){
* *** * **** ** * * *** ** ** *** ** * * * ** ** ***** ** * **** * * * **
* *** * * **** ** * * ***** * ******** * * ** ** *** ** * * * * **** ****** *** *** *** * * fb;
********* * *** ** * * ******* * * * * *** * * * * * * * * ** *
* * ** * **** **** * *** ***** * * * * ***** ** ** * ***** *
**** **** * *** ** * ** * * * * * * * * *** **** ** ** * * * * * fc;
* * ** * * * * * ** * *** * * ** * * * * *****
** *** **** * * ** * *** ** ** * ****** *
******* * * * * **** ** ** ** * * * * *
*** * *** *** *** *** * *** ** ** ** ** ** * ** ** * **** * ** **** * fa;
}
}
}
int main(){
int a,b,c;
* * ***** * **** ** * * * ** **** *** ** * * * * * * *
* * *** ** *** *** *** **** * *** *** * * * *
* **** *** * **** * * * * ** * ** * **** *** ***
return 0;
}
answered
Nov 9, 2016
by
HoMingJui
(
-126
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdlib.h>
int main ()
{
** *** *** * * **** * i , k[3], m, x;
** *** ** ** **** **** * ** * ** *****
{
**** ** ** * * ** * * * * * * ** * &k[i]);
}
* * * ** *** * ****** **
**** ** ** *** ** *** * * ** *******
{
** **** * ** * ** * ** * * ** ** * ** ** ** *** **** **
* * *** ** * * * *** ***** *** * * *
* ** * *** * * *** *** ** ************ * *** *** * *** **
******* * * * ** **** *** * *
***** * * *** * ***
*** * ********** * * * ** *** * * m);
* ** **** * ** * * ** * * * *
** **** * * *** *** * *****
{
* ** * * * * *** * ** * **** ** *** ** * * ***** * * **
* **** * **** * * * * *** ** ** * ** *** * * *
** **** * * **** * * **** * * ** * ** ** * *** * * **
* ** * ** * ** ** **** ** ** * * ** *** ** *
}
** * *** * * * * *** * ** *** * ** x);
***** * * * * ** * ** * 0;
}
answered
Nov 9, 2016
by
410523030
(
-34
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include ** *
** * *** ** * *** *
* *** * * **** *** *
** **
int bg(int a,int b,int c){
** *** **
**** *** **** ** (a > b ***** * a > c)
** * ** *** * * ** a;
*** ** ** * * ** * ** * if (b > a *** * * b > c)
* *** * ** ** * **** * b;
** * *** ** * * * ** * ** * if (c > a ** * ** c *** b)
* ** ** * *** * *** *** c;
}
* *
int sm(int a,int b,int c){
* * * * * * * *****
* *** * *** * *** * (a * **** b *** * * * a * * c)
** ****** * ******* *** * ** a;
* * *** ** * * *** if (b *** a * **** b ** * c)
**** * ** ** * *** * * b;
*** * ** ** **** * if (c * a * *** *** c < b)
*** * ***** ** * **** **** **** c;
}
********
int main (void){
*** * * * * ** ** * *
* * ****** * * * ** ***
* *** *** * ** **** ** * %d * ** * * ** ** * * *** * *
* ** * * * **** **** * * **** *
** * * ** *** **** ***** ** **
******** ** ** * * ***** ** ** ** * * ***
** **** *** * ** ** **** ** ** *** *
* * ** * * * *** ***** * * 0;
}
answered
Nov 4, 2016
by
蘇瑋朝
(
-8
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include ** **** ***
*** * * *** *
*** * * * * **
* ****
int bg(int a,int b,int c){
** **** ** * ** ** *
** *** ***** * ** ** ** (a > b *** * * ** a > c)
* ** ** ** * * *** * * a;
* ** ** * ** *** if (b > a * * * ** b > c)
** * ** * * ** * ** ** b;
** * ** * * * * * ** if (c > a * * * **** c * ** b)
* *** * * * * ***** ** c;
}
** *
int sm(int a,int b,int c){
*** ** * * * ** ** **
* ** * ** * * * ** * *** * (a * * b * * * a *** * c)
* * ** * * ** * ** ** ** a;
*** *** ***** ** ** * *** if (b ****** a ** *** b ** ** c)
***** * ******** ** ** b;
*** * ** ***** *** * *** if (c a * *** c < b)
* * * * ** * ** * ** * ** c;
}
*** * *
int main (void){
****** ** ******
** *** ** * * ** * * *
*** * * ****** * * * * * * * * **** %d ***** * * * * * *** ***** **
**** ** * ** * ** ** **
* * * ** * * **** * *
** **** ** *** * * * * ** * ***** *
*** * * *** * * * ** * ** * ** *
* * * ** * * * *** 0;
}
answered
Nov 4, 2016
by
蘇瑋朝
(
-8
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
2
3
4
5
next »
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.71.254.250
©2016-2025
Related questions
2
like
0
dislike
44
answers
AC 20161102 作業1
[Exercise]
Coding (C)
-
asked
Nov 2, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 16861 -
Available when:
Unlimited
-
Due to:
Unlimited
|
3.9k
views
0
like
0
dislike
76
answers
AC 20161019 作業 2
[Exercise]
Coding (C)
-
asked
Oct 19, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 14120 -
Available when:
Unlimited
-
Due to:
Unlimited
|
5.7k
views
0
like
0
dislike
91
answers
AC 20161013 作業 2
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13617 -
Available when:
Unlimited
-
Due to:
Unlimited
|
6.5k
views
0
like
0
dislike
201
answers
AC 20161005 作業 2
[Exercise]
Coding (C)
-
asked
Oct 5, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 12293 -
Available when:
Unlimited
-
Due to:
Unlimited
|
12.3k
views
0
like
0
dislike
99
answers
AC 20160921 作業2
[Exercise]
Essay (Open question)
-
asked
Sep 21, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 11341 -
Available when:
Unlimited
-
Due to:
Unlimited
|
6.6k
views
12,783
questions
183,442
answers
172,219
comments
4,824
users