Toggle navigation
Courses
Questions
Tags
Users
AC 20161102 作業2
1
like
0
dislike
1.1k
views
請設計一程式,使用者會輸入三個正整數,請找出其中最大及最小的數然後輸出。
請利用函數的方式來完成這個作業
[Exercise]
Essay (Open question)
-
asked
Nov 2, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 16865 -
Available when:
Unlimited
-
Due to:
Unlimited
|
1.1k
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 biggest(int x,int y,int z);
int smallest(int x,int y,int z);
int main()
{
int i,num[3],max,min;
** ** *** ** * ** * * * * * * * **
** *** *** * ** ** * * * * * * * * ** * * *** * ** * * * * **
** * * * * * *** * * * * * ****** ** * * ***
* ** * **** * * * ** * * **
** *** ** * * * * * * ****** * * * * ** ** * *
* * *** * ** * ***** ** * * * ** * *
* ** * * * ** * * * ** ** * 0;
}
int biggest(int x,int y,int z)
{
*** * * * * * * *** * * ** * * ** ** * *** ** * *
* ** * * * **** * * * * * * *** ** * ***** * * ** * **** ** * x;
* **** * *** * **** * ** * ** * * * * * ** * **** *
* * * ** * * * * * * * * * * *** * * * * y;
* * * * * * ** * ** * * * * * * **** ** * * * * ** *
* * * * * * * * * * * *** ** * * * * * * * * z;
}
int smallest(int x,int y,int z)
{
* * * * * * * * * * ** * * *** *** * ** * *
* *** * *** ** * * ** * * * * * * * * * * * x;
* ** ***** * * * * * * ** *** * * * * *
** ** ** * ****** * ** * ** * * *** ** ***** * * * * y;