0 like 0 dislike
1.2k views
請設計一個程式,讓使用者輸入三個整數數字,程式會輸出三個數當中最大的那個

 

範例輸入:

-10 5 99

範例輸出:

99
[Normal] Coding (C) - asked in 2016-1 程式設計(一)AD by (18k points)
ID: 13021 - Available when: Unlimited - Due to: Unlimited
| 1.2k views

54 Answers

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



int main()

{


** **** * ***** * * * * * input[3] = {0},i = 0,j;
* **** * *** ** * ** *
** **** ** *** * *** ******* * = 0;i < 3;i++)
**** * * * * * ** ** %d ",&input[i]);
** * **** ** **** *****
**** **** ** * * * * = input[0];
* ** **** * ** *** * * * ** = 1;i < 3;i++)
**** * * * ** * * < input[i])
* * ** * * * *** * ** ** *** * ** = input[i];
*** * ** ** * ** * * * ** * *
***** * * **** * ** ** ** ** ** *
* * *** ** ** * * * *
** * *** * * **** **
* * * * ** * * **** * ** *** **
** *** ** * * * ***** 0;

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



int main()

{


* ** ** ** * *** * **** input[3] = {0},i = 0,j;
*** **** * **** ** **
** * ** *** * *** * * *** = 0;i < 3;i++)
** ** *** * ** * * * * *** %d ",&input[i]);
** * * **** * * *
* * ** * * ***** = input[0];
* * **** * * **** * * = 1;i < 3;i++)
** * * * ** * * ***** *** ** < input[i])
**** ***** * ** ** **** ** * ***
******* * *** *** *** ****
* **** *** * * ** *** * ** ** ***** * * * *
** * *** * * ** **
** *** **** ** ** * * **
** * * ** * * * * * * * ***** *
* *** ** * *** ** ** 0;

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

#include <stdlib.h>



int main(int argc, char *argv[])

{
* * * **** * ** ** i[3],j,k;
** **** * ***** * * ** * * * = 0; j < 3; j++)
**** * * * **** ** * *** * * * ** ** ** * * ** * **** *** ** ** *
*** ** ** * * * * * *
** * ** ** * **** * **** * = 0 ; j < 3 ; j++){
** ** * *** ** * * ***** * * * ** * = 0; k < 2 ; k++)
** ******* ** ** ** * *** **** *** ***** * ** **** * > i[k+1]){
*** * * * ** * ** ** ** * ** ********* *** * * ** ** * ** ***** * ******* ***** * += i[k+1];
* * * * * *** * *** * *** ** *** * ** ** * ** ** * * * *** * ** * * * * * * = i[k] - i[k+1];
* ** * * * * * * ** ** ** *** * * * **** ** * **** * **** ** * -= i[k+1];
* * * * *** * *** *** * *** *** * * *** ** * * ** ** ****
*** * * ** ** ** * * ***  
* * * ** **** * *** * *** * * ** *** **** * * * * ***  
** *** * * *** ** * *** 0;

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

#include <stdlib.h>



int main(int argc, char *argv[])

{
* **** *** * ****** * ** i[3],j,k;
** ** * ** * *** * = 0; j < 3; j++)
* ** * * ** *** ** ** * *** * * *** * * *** **** ** * ***

    
*** * * *** * ** * **** = 0 ; j < 3 ; j++){
* ** ** ** *** * * *** * *** ** ****** *** * = 0; k < 2 ; k++)
* *** *** * * ** ** * ** * **** ****** **** *** * * * * ** * > i[k+1]){
** * ***** * ** ******* * * **** * ** ** * ** * * * ** ** ** ** * * * +=i[k+1];
* **** * ***** * * * * *** * *** * ** * * ** * ** * *** *** * * * * * * * = i[k]-i[k+1];
* ** * ** * ******* ** * ** *** ** *********** **** * **** * * *** * -= i[k+1];
* **** * * *** ** ***** ** * *** * * ** *** * * *** * *****
** * *** * * *
**** * ** * **** *** * * ** ** * ** *
***** *** * *** ** *** ****** * ** *  
* * * *** *** * *** * *** *** * **
* ** *** ** ** * * * ** 0;

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

#include <stdlib.h>



int main(int argc, char *argv[])

{
**** * ** *** * * ** ** * i[3],j,k;
** **** * * *** * * * = 0; j < 3; j++)
* ** ****** * *** * * * * ** * *** ** ** * * * ****
* * ****** ** ***** *
* * *** ** *** * *** ** = 0 ; j < 3 ; j++){
** ** * * * *** * **** * * * * *** = 0; k < 2 ; k++)
* * *** *** ** * * * ****** ** * * * * * * ** ** * ** ***** * *** *** * > i[k+1]){
* * ** * ** ***** ** *** ** ** * * ** * * **** * * * **** * * ** * +=i[k+1];
** ** *** ******** ** ** ** * ** * ** *** ** * * ***** * * ** * ** ** = i[k]-i[k+1];
* * * ** **** *** ****** ** * *** ** ***** ***** * * *** **** ***** ***** ** -= i[k+1];
*** * ********** * * * * ** ** * * ***** *** ** * *
**** * **** ** *** ** *** *
** * * * *** ****** * ** * ***** * **** **** **
*** * * * * * * *** = 0 ; j < 3 ; j++)
* ** *********** * **** *** * * ** * * * * **** ",i[j]);  
* ** ** * ** *** ******** * * ** * *
* * ***** ** ***** ** * ** ** 0;

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

 int main()

 {
* * * **** * **** ** * a,b,c;
* * ******** *** ** *** **** %d %d", &a, &b, &c);
*** * ** * **** *** ** ** * *** * a>c)
* **** * * * * ** *
* *** ** * * * * **** ** * * * ** *** **** ** * * *  
* * * **** * * ** * ** * **
*** * * ** * if(b>a * * * b>c)
* * *** ** ** * ** ** *
** * * ** * * ** * ** * * ** * ** * * * ******* **
* ******* * ** *** *
*** **** **** * ******** * * if(c>a * *** c>b)

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

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

 int main()

 {
*** * * * ***** * * * * a,b,c;
* *** *** ** * * * ** * * * %d %d", &a, &b, &c);
** ** ** *** * ****** * ****** * ** ** **** a>c)
*** ** *** ** **** ***
*** * *** *** * ** ** * ** **** ** ** * *  
* ** *** * * *
** ** * ** * ** * *** * if(b>a * * ****** b>c)
**** * * * * * * * *
*** * **** ** *** *** *** ** *** * * **** ***** * * * *** ***
***** ** * * * * ** **
* * ** ******** * if(c>a && c>b)

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

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

 int main()

 {
* ** * ** ** ***** a,b,c;
* * * ** ** * **** ** %d %d", &a, &b, &c);
* * * * * * * ** * * > b * *** ** * a > c)
* * * ** ** ** ***
* ** * * * * * *** ** ** ** * * * * * * ** * *  
** * ** ** ** ** * * *
** * ****** **** * * * * if(b>a * * * ***** ** b>c)
** * * * ** ** * * *
* * **** * * * ** * * * * ** * * ** * ** *** ** ** *** ** **** **
*** ***** * **** * *** *
** * ** *** * * ***** * * *
* ** *** * * ** *** * * *** ******** **
** * * ** * * *** * * 0;

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

#include <stdlib.h>



int main()

{
* * ** ** * *** * a , b ,c;
** ** ** ** * * ** *** * , &a , &b , &c);

    
* **** * * * * * ** * * * * * **** ****
** * * ** ** * ** **** ** * * **** * , a);
*** **** * ** ****** * ** *** * ***** **
* * **** * **** * * * ** * * * * ******* , a);
*** ** * * * * * ***** *** *** * * ** *** *
**** ** * **** ** ** ** * ** ** * , b);
* * * * ** * ** * ** * ** ** ** ***** * *
* *** * * * * ** ** *** ******* ** , b);
* * * * ** ** * * ** * ** * **** ** ** * **
** *** **** * * ** * **** * ** * ** *** , c);
* * * ****** *** ** ** * * * * * ** ****
* ** * **** * * * ** ****** * * ** * , c);
** ** ** *** * *
** * * * ***** ** ** * * * * * ** * *
** ** ** *** * ** * *** ** 0;

    



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

#include <stdlib.h>



int main (void)

{
* * * * ** * * ***** num1=0,
* ** * ***** * * * * ** *** * ** ** ** ***
******* ** ** * ******** **** ** **** * ** *
* * ** * * ** ** ** * ** ** *** * *
* *** * ***** * * ****** ** *** ** * * *
* ****** ** * * * * * * * ** ** *** * * *** * * *** ** **
*** **** ** * **** ** ** ** * * * * * *
******* ********** ***** ** (num1<num2)
** ** * ** ** * ** = num2;
**** **** * * * ** * * **
** * * * ** * * ** * = num1;
******* * * * * ** * ** *
* * * * ** **** (num3>big)
** *** *** * ** ** * * * = num3;

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

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

}
answered by (-170 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.126.200
©2016-2024

Related questions

0 like 0 dislike
21 answers
[Normal] Coding (C) - asked Oct 13, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 13421 - Available when: Unlimited - Due to: Unlimited
| 522 views
0 like 0 dislike
23 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 13024 - Available when: Unlimited - Due to: Unlimited
| 625 views
0 like 0 dislike
21 answers
[Normal] Coding (C) - asked Oct 11, 2016 in 2016-1 程式設計(一)AD by Shun-Po (18k points)
ID: 13022 - Available when: Unlimited - Due to: Unlimited
| 653 views
0 like 0 dislike
0 answers
[Resource] asked Dec 31, 2016 in 2016-1 程式設計(一)AD by laich (937 points)
ID: 20299 - Available when: Unlimited - Due to: Unlimited
| 16 views
0 like 0 dislike
0 answers
[Resource] asked Dec 31, 2016 in 2016-1 程式設計(一)AD by laich (937 points)
ID: 20297 - Available when: Unlimited - Due to: Unlimited
| 17 views
12,783 questions
183,443 answers
172,219 comments
4,824 users