0 like 0 dislike
請設計一程式,讓適用者輸入十個正整數,程式會找到其中最小的數然後輸出。

 

Sample input:

1 2 3 4 5 6 7 8 9 10

Sample output:

1
[Exercise] Coding (C) - asked in 作業 by (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 45 views
0 0
Called for Help

37 Answers

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

#include <stdlib.h>

#include <math.h>

int main(void) {
* ** * * * *** * * i,min=9999,a[10];
*** ** ** *** ***** **** * ** ** * *
*** * ** * * **
* * ***** ** ** * *** * ***** ** **** *** ** ** * * * * **
***** * ** **** *** * ** ***** * *** * ****** * * *
*** * * * ** *** * * * ** ** ***** * ***** *** * * * ** * **** ** ** ** *
* **** * * * *** * * * * * * ** *
* * * * *** * ** *
***** * ** ** * ***** * ** ** * *** * *


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

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

#include <stdlib.h>



int main()

{
* * * * * * i, j, c;

   int num[10];
* * ** *** * *** * = 0;i <= 9;i ++)
* * *** ****** ** * * * * * ** * * *** &num[i]);
* ** * ***** ** *** * ** = 0;i <= 9;i ++)
* **** * *** * * **** ** ** ** ** = i+1;j <= 9;j++)
* * * * ** ** **** ** * *********** ** *** * *** * > num[j])
*** * * * **** * * *** * **** * ** * **** * *** * **** ******
* * * **** ** * * ****** ** * * * * ** *** ** ** * * ** = num[i];
** * * ** * * ** ** * ** *** *** * * * ** * * * ** ** ** * *** *** *** * * * *** = num[j];
* ** ** * * * * ** * *** * ** ** *** ** * * ****** *** *** * * ** * ** ** * * * = c;
********* * *** * * * * ** ** * *** * * * **** ** *** * * * * * *  
* * ** * ** ** * *** ***** * * ** ** ** ** num[0]);
**** ** **** * ** ** * * **** * * * * ** ** *
* **** * * * * **** 0;

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

#include <stdlib.h>



int main()

{
* ***** ** * ** *** * i, j, c;

   int num[10];
** ** * * ** *** * = 0;i <= 9;i ++)
* ***** *** * * ** ** *** * ** ** * ******** &num[i]);
** ***** ** * * * = 0;i <= 9;i ++)
* *** *** *** * * * *** * * * = i+1;j <= 9;j++)
** * * **** **** *** ** *** ******* * *** * * *** * * * * * > num[j])
* **** * * * **** * * * * *** ***** ** *** * * * * * * **** ** ***
* * ** ** * ** * **** * * ** * ***** * * ** * ** * *** ** * * ** ** * ** * ** = num[i];
* ** * ** *** * * *** ** *** *** ** * *** ** *** ** *** *** ** * * ** *** **** = num[j];
* ***** * ** ****** * *** * * *** ** * * ** *** ******* * * * **** ** ** **** = c;
*** * * ** *** * ** *** * * ** * * * * * *** *** ** **  
*** * ** ** * * * * **** * *** *** * * * * * num[i]);
* * ** ** * ** ** * ***** *** * * ** **** * ** *** ** * ****
* **** ** ** ** 0;

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

#include <stdlib.h>



int main()

{
* * ** * * *** i, j, c;
**** * * * ** * num[10];
* * * ** * * ** = 0;i <= 9;i ++)
* **** * *** ******* * * ** * *** * ** *** &num[i]);
* * *** * * ** *** = 0;i <= 9;i ++)
* ** * ** * ******* ****** *** = i+1;j <= 9;j++)
* * * * ** ** *** * **** ****** * *** *** * * > num[j])
* *** * ** * **** *** * *** ***** ** * *** *** **** **** * * *
* *** ** **** *** * * ** * ** ** **** ***** * * ** * * * ** *** * ** * ** * = num[i];
* ***** ** * ** ** *** ***** *** * * * * ** ****** ** *** * ***** * ** * ** * *** * = num[j];
* ** * ***** ** ** * **** **** *** * * * ** * * * ** * **** * * * ** ** ** = c;
* ** * * * * * ** * ** * * * * ** * * ******* * ** * * * *

   
** * ** * *** ** * *** ******* * **** ***** * * ** num[i]);


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

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

#include <stdlib.h>



int main()

{
*** * ** * ** ** ****** * i, j, c;
* ** ** * * ** num[10];
** * * * * *** = 0;i <= 9;i ++)
* ** ** **** * ***** * * **** * * * * ** * * ** &num[i]);
* ** **** * * **** = 0;i <= 9;i ++)
* ****** * ***** *** * ** *** * = i+1;j <= 9;j++)
* **** *** ** ***** ** ** **** * * * ** *** ** * > num[j])
*** ********* ** *** * * ** **** ** * * * * ** * * * * * * *
** ** * *** * * *** * ******* *** * ** * ***** ***** **** ** ** * * * **** * ** = num[i];
* ******** *** ** ** ***** *** * * ** * **** * ** * * * ** * * * ** ** ** * ** * = num[j];
*** ** *** **** *** * * *** * * **** ** * ** *** ****** ** ******* * *** * = c;
** ** * * * * * ** **** * * ** * * * ** * * ** *** ******** * ** ** *
** ** **** * * **
* * ** **** ** ***** * * **** *** *** ", num[i]);


** * ** * * * 0;

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

#include <stdlib.h>



int main()

{
*** * * **** * * i, j, c;
* * * * * ** **** num[10];
* * * * ** ** *** = 0;i <= 9;i ++)
**** * ** ** ** *** * ** ****** ***** * &num[i]);
* *** * ******** * ** = 0;i <= 9;i ++)
**** * * ** *** ******* * ** * = i+1;j <= 9;j++)
** *** *** *** **** * * ** * **** *** * * * *** * > num[j])
* ** **** ** ** * ** * * * ** * * ** * * * * * * * * *** **
***** * **** ** * * * ** *** ** * * ***** *** ** ** *** *** * ** **** *** * * = num[i];
**** ** ** * ** * **** * ** ** **** **** * * * * *** ******* ** * ****** ** ** * * *** = num[j];
* * ** ** * * ** * * * ** ***** ****** * ** *** * ** *** * * ** * * * ** * ** ** *** = c;
*** * * * * ******* ** ** * * * * ** * ** * * *** *
* * * ** * * * **** *** * num[0]);




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

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

#include ** * ** * * *



int main()

{
* ** * *** * * * i, ** min;


* * * * ** * * (i = 0; i < 10; i++)
* * * * ***** ******** *** ** * * * * * ** * *** ***** ** * * ****


** *** *** * *** = num[0];
* * ** ***** * ** (i=1; i < 10; i++)
** * * ***** * **** ** * ** * ***** * *** ** * **** ** *** * (min > num[i])
* *** * ** *** * * * ** * **** * * *** **** * ** * **** * *** * * * = num[i];


* *** * ** ** *** *** ** ** * *** * ** min);


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









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

#include<stdlib.h>
** **** ** ** ***

int main()

{
** * ** * * * **** i,  num[10]={0},min;
** ** ** * **** **** * ** ** * * *
** * ***** * * *** * * * ** * ** ** ** [i]);
** * **** * ** **** ** *
* * ** ***** **** * ** **** ******* * * *
* ** ** **** ** * **** * ** *******
* *** ***** * ** * ** ** **** **
* ** * **** ** * * * * * ** * ** **** min);
** **** ***** * ** * *** ****** * *
* ** *** ** * * * ** * ** * 0;

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

#include <stdlib.h>

int main()

{
** * ** * * ** * * * ** **** ** * *
** * ****** * ** *** * *** i, stud[10]={0}, min;
* ** *** * *** *** *** * ***
* * * * * *** * ** * * = 0; i < 10; i++)
* ** * **** * * **** **** ** * * **** * ** * *** ** **** &stud[i]);
** * * ** ** * ** **** *
* ** ** * * ** * * = stud[0];
**** * ** ** ** * * *** = 1; i < 10; i++)    
*** ****** **** * * **** * * **
* * * * **** * * * **** ** ** ** ** > stud[i])
** *** * * * * ***** * **** ** ** * * *** *** * = stud[0];
* * ** ** * **** * **** * * ** * **** ** stud[i];
** * * *** *** ******* *** * *** * * * *
* * * * ** * * ** * * * * * * *** **
* * *** * ** *** ** ** ** * ** **** ** *** ** ****** **** ** min);
* * * * *** **** *** * ** *** * *** * ** * * * *** * * * *** **
** * ** * * * *** **** **
*** * ** ** * * **** ** ** * * ** ***
* * **** * ** ** **** * * 0;

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

int main()

{

int * **
** * **** ** * ***
** **** *** * * * * *
** * ** * * * *

{
***** * * ***
** * ** *
* * ** * *** ** **



return 0;



}
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:162.158.79.137
©2016-2018

Related questions

0 like 0 dislike
54 answers
[Exercise] Coding (C) - asked Oct 20, 2016 in 作業 by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 60 views
0 like 0 dislike
31 answers
[Exercise] Coding (C) - asked Oct 20, 2016 in 作業 by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 48 views
0 like 0 dislike
37 answers
[Exercise] Coding (C) - asked Oct 20, 2016 in 作業 by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 45 views
0 like 0 dislike
45 answers
[Exercise] Coding (C) - asked Oct 13, 2016 in 作業 by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 56 views
0 like 0 dislike
40 answers
[Exercise] Coding (C) - asked Sep 29, 2016 in 作業 by Shun-Po (17.9k points)
Available when: Unlimited - Due to: Unlimited
| 119 views
2,964 questions
57,158 answers
28,936 comments
938 users