0 like 0 dislike
2.1k views

Write a program that will prompt the user to input ten integer values. The program will display the smallest and greatest of those values. It also displays the value that occur the most.

寫一個程式 輸入十整數 找出最小值、最大值、眾數

Example input:

100 5 5 7 89 62 54 611 1 87

Example output:

Greatest:611
Smallest:1
The most occurring item:5

 

Example input 2:

100 5 5 7 7 62 54 611 1 87

Example output:

Greatest:611
Smallest:1
The most occurring item:5
[Exercise] Coding (C) - asked in Chapter 8: Arrays by (5.2k points)
ID: 34968 - Available when: 2017-11-30 18:00 - Due to: Unlimited

edited by | 2.1k views

55 Answers

0 like 0 dislike
Hidden content!
#include<stdio.h>
void sort(int a[],int n)
{
    int i,j,temp;
** ****** *** ** **** ***** ** *
    {
*** ** ** *** **** * *** **** ** * *** * ***** * * ** * ****
* ******* * * * * * **** * ** *** ** * *
**** *** ** * * *** **** ** **** * ** **** * * * ***** * ** * **** * * * * *** * *
*** * ** * * **** *** * * * *** * ** *** ** ****** * *
***** * **** ** * * * ** *** ** * * ** *** * ** ***** * * ** * ** *** * *** *
** * * *** * ** * * *** ** *** * * * *** ** * * * * ** ** * ** *** * ** * * * * **
* * ** *** * * * * * * ***** * * *** * ** *** ** *** *** * * *** ** *** * ** **
*** ** *** *** * ** *** * ******* *** * *** ** * *** * * ***
* * ** ** * *** * * ****** **** * *
    }
}
int search(int b[],int n, int j)
{
    int i;
* ** * * ** ** **** * *** * *
    {
* * *** * * ** *** *** * * * *** * **** *** **
**** * * ** ** ** * *** **** * ** ** * * * *
****** ** ** ** * ** * *** * **** ** * * ** * *** * *** * ** ** *** i;
** ** ** * * ** **** * ** *** * ** **
    }
    return 99;
}
int greatest(int a[],int n)
{
    int i,g;
    g=a[0];
**** ** * * ** ** * ** *** ** **
    {
** * * * * ** ****** ** * ** ** * ** *** ** *** ** ** *
* * * * *** **** * * *** * *** **** * * **
* * * ** * * ** ** * **** **** ** **** *** * ** * *** ****** * *
** *** *** ** * **** **** ** * ** ** **** * * *
    }
    return g;
}
int main()
{
    int a[10],b[10],counter[10],o[10],i,j=0,k,n,g;
** *** * ** *********** * ***
    {
** *** ** ***** * ********* ** ** * ** **
******* * **** * * **** * * * ** ** **
*** ** ** * ***** ***** **** *** ***** * * *
* *** ***** * * ** ** *** * **** * * ***
** ** ** ** * * * * * ***** * **** ** * * * ** **** * *** ****
    }
    sort(a,10);
*** ** * ** * **** ** * * ** * * * * **** **** ** *
** *** **** * * *** * **** ** * * ***** * **** *
** * ** ****** ** *** ** *** * *
    {
* * ** ***** ***** ** ** * * * * ** * ** *** *
* * * * * * * ** ** *** ** * ***** ***** **** *
** * * * **** *** **** *** **** *** * * * * *
** * **** ** * ** * ** * ** **
* ** * **** ** * * * ** ** * * ** ******** * ** **** * ** ***** **
** * * * * ** ** * **** ** * * *** ** *
** * **** ** * * * *** * **** * * ** * * *
* *** *** **** ** * * ** ****** ** * *** * ***
*** * * ** * * **** * * * **** * * * * * ** * * * * * *** ** ***
*** *** ** ** *** ** * **** ** * * *** ** * * * ** ** * * * ** * ***
* * ** ** * * ** * * * *** ** ** *** * * ** * * *** ** * ** ** * * *
****** * ** *** ** **** * * *** * ***** * **
    }
* ** * * * **** *** ** * ****
*** * * * ** **** * **** * ** most occurring digit:");
** ** ** * * * * ** * * *
    {
* ** * ** * * * ***** * **** ** *** * *
* * * * * ** ** * ** ** *** ** ** * *** ** ***
* * * * * **** ** * ** * ** * ** * ** * * ** **** * **** * * ** * ** *
* ***** * * * * * * * * * * *** **** * * ** * **** ***** * *
* **** * * * * * * *** * **** ** * ** ****
    }
}
answered by (-255 points)
edited by
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
**** * ** * * * * * ** a[10];
** * *** * *** ** * ** z,max,min,x,c=0,p;
* *** * ** * * *** * **** (z=0;z<10;z++)
    {
* * ** * * * **** * ****** * * *** *** ** * * ** * *****
    }
* * *** ** * * * * * *
*** *** ** *** ** ******* (z=0;z<9;z++)
    {
** * ** * * * * ****** ** ** * * * **** * * * (max<=a[z+1])
* *** * *** * *** * * ***** * *** * * *
* *** * * ** * **** * * *** ** * * * * * ** * * ** * ***** * *
**** **** *** * ** ** * * * * * ** **** *** *
** ** * * * ** * ***** *
* ** ** **** ** * *** * * * **** * ****
** * ** * ***** * * ***
* ** ** *** ** * (z=0;z<10;z++)
    {
*** ***** ** *** * *** * * *** * ** * ****** (min>=a[z])
*** ********* * ** * * **** ** **
* * **** *** * * ******* ** ** * * * * * * * * * *** ** *** **** *
* * **** * ** * * ** * * * * ** ** * *****
    }
* ** * ** ** * ***** * ** * ***** * * ** **** ***
* ** ** * *** * * * b[10]={0};
******* * ******** ** * (z=0;z<10;z++)
    {
** *** ** * ** * ** * * * *** ** ** **** *
** ** * * * *** * * * ***** ** * * * *
*** * ** * * * * **** * * **** * *** * * * ** *** *** * ** **
* *** * * * * * ** * * ** *** * *** *** * ** * * * *** * ** * **** *
*** ** * ** ** * ** ***** * ****** * * ** * **
    }
* * ** * * * * ******* *** * *
    {
* *** ** * ** * * *** * **** * * * * *** ***
** ** * *** ***** * * *** * ** ** *** * * * *
* *** * * * ** ** ** ***** * * ** ** *** ** **** * * * ** ** * ** * **** *
** *** * * * ** ** ** ** ** **** *** *** *** * **** * **** * *
***** * ** * ** * ****** * ** * * * *
    }
***** * ** * * ** * * ** ** ** * most occurring item:%d",a[p]);
* * ** * * * * ** * *** 0;
}
answered by (-140 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
* * ** * ** ** * *** * a[10];
* * * * *** ** ** * z,max,min,x,c=0,p;
* * * ** * ** ** (z=0;z<10;z++)
    {
* * * **** * * * ***** *** * * * * ** **** ** ** **** * *** * * *** * ***
    }
** * *** **** * * * * *
* * * * * * *** ** (z=0;z<9;z++)
    {
* ** * * * *** * * * ****** * ** (max<=a[z+1])
*** ** ** ** * * * * * * * * ** ** **
** ***** * * *** ** ** ***** **** * *** * * * * ** ** ** ** *
* **** * * *** *** * ** * * * *** * ***
* * ** ** * * * ** **
* * * * * * * * ** * * **** ** ***** * * ** *** ***
* *** * * ** **** ****
** * *** * * ** * * ** (z=0;z<10;z++)
    {
* ** * ** ** * * * * ******* ** * ***** * **** (min>=a[z])
** ** * ** * * ****** ** * * * * ** * * ****
* * * *** *** * ******* **** ** * ** * * * ** * * * * **** **
** * * * * ***** * ***** *** * * *
    }
* ** ** * *** **** * ** * * * ** ** *** **
** * * *** * ***** b[10]={0};
* ** * * * * * (z=0;z<10;z++)
    {
******** ***** * * * *** ****** ** * * * * * * *** *********** *
*** **** ** * *** *** * ** ** ** ** *** ***
** * * *** * * * **** * *** * * * ** * ********* * * * * *** * * * *
* * *** **** * *** ** * * ** * * ** * ** * * * * *** *** *** * ******** * * ***** * **
* * ** * * * ** *** * ** * * ** * ** **
    }
*** ******* * **** * * ** * ** * *
    {
* * ****** * * * * * *** * * * * * * * *** * * * * **
* *** *** ****** ** * * * **** *** * **
* * * *** *** ** * *** **** ****** * * * * ** ** * ** *
** ** ** * * * * * ** * * **** *** **** * * *** ***** ** ***** ** * *
* * ** ** ***** * * * * ** ** * *** *
    }
* ** *** *** * * ** ** ** ** * ** most occurring item:%d",a[p]);
* * *** **** * *** * **** 0;
}
answered by (-66 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Wrong output
0 like 0 dislike
Hidden content!
#include * ** **** *
#include ***** * ** ***
int main(int argc, char *argv[])
{
** * ** *** * arr[10];
** * ** **** mode[10][2];
* * *** * * %d %d %d %d %d %d %d %d ** * **** * ** &arr[1], &arr[2], &arr[3], &arr[4], &arr[5], &arr[6], * * ** ** * * ****** **

 int i,j,temp;

* * * *** * *****
* **** *** * **** ***
** ** * **** *** ** * * ** * ** ** {
** * * * ** * * * * * *** **** *** temp=arr[j];
* * * ** ****** ** * * * ***** * * *** ***
* ****** * * *** * ** ** *** * * * * ** *** * * ******** * *** ***
 }

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

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

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

int max;
int k=0;
max=mode[0][0];
** * * * * ** * ** * * **** **
***** * * * ** ** * * ** * * * *** ***** *** *

* * ** * ** ** * most occuring * *** ** ** **
**** ** *** * * 0;
}
answered by (-168 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 like 0 dislike
Hidden content!
//
//  main.c
//  midterm
//
//  Created by 蘇沛潔 on 07/12/2017.
//  Copyright © 2017 蘇沛潔. All rights reserved.
//

#include <stdio.h>
#include <stdlib.h>

int main()
{
** ******* ** * *** * *** a[10],Greatest = 0,Smallest = 1000,i,j,x = 0,y = 0,k;
******** * * ** ********* ** = 0 ; i < 10 ; i++)
* **** ** ** *** *** **** * *** ** * ** ** ** ** * * *** * ** ** ***
* * * *** *** ** ** = 0 ; i < 10 ; i++)
* * * *** * * ** *****
* * ** * **** * ****** * * * * ** * * * > Greatest)
*** * * ** * **** ***** * **** * *** *** ** ** * * * ** * * ** * * * * * = a[i];
** * * *** ** * * ** * * **** * * * *** * *** ** < Smallest)
* ** **** ** * *** ** * ** ** *** ** * ** * ** **** ** * * = a[i];
* * ** * * **** ** ** *
*** * * * * * ****** ***** *** * ** * *****
** ** * * ** ** ** * * ** * ** ** * * ** *
* *** ** * * * * * * * * * *
** ** * * ** * ********* * * = 0 ; i < 10 ; i++)
** * **** *** **
* ** * * ** ** * ** *** * ****** * ** * ****** * = 0 ; j < 10 ; j++)
** ** * * ** ** ** * * *** * * ** ** *
* * * * * **** *** ** *** *** ****** **** *** * *** * * * == a[j])
** * *** ***** * * ******* ** * *** * ***** **** ***** * * ** * ** * ** ** *** * ** *
****** ** ** ** * * ** * **** *** *
* * * * * ** *** ** * * ** ** * * * > x)
** * * **** ** *** *** * ** * ** * * *****
*** * ******** ****** * * **** * **** **** * * **** *** * * * = a[i];
* ** *** * * *** * * *** * ** ***** * ****** ** *** *** * * * * * * * = y;
*** *** ** * * * * * ************ * ** ** **
** **** * ** ***** * *** **** ** * * = 0;
* ***** ****** *********
* * * *** *** **** * *** most occurring item:%d",k);
* * * * * **** * * * **
** * * * * * * ** ** ** 0;
}
answered by (-127 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main(void)
{
    int tab[10],i,j,o,b,a,g,s;
    a=0;b=0;
    for (i=0;i<=9;i++)
    {
** *** ** ** *** *** * * ** * ** * ** ** ***** * ** * ** * ******
    }
***** * ***** ** * ***** *
    for (i=0;i<=8;i++)
    {
******** * * ** * * ** ** * * * *** * * (j=i+1;j<=9;j++)
* * * ** ** *** ****** ***** ** ** * * ** ****
******* * * *** ** ** * ** ** * * * * * *** ** ** (g<tab[j])
** * ** * * * * * * *** ** * *** * * * ** ** ***** ******** * * **
* * * ** * *** ** * * *** * * * * ** ** * ** * *** ****** ** * * *** ** ***** *** *
*** ** * ** * * *** * *** *** *** ** ** ** * ******* **
* ** * * * *** **** **** * * * *** ***** * * * * * * * ** * * ** ****
*** ** ** ** ** *** * * * ** ** ** * * ** * * * ** *** *
* *** ** * ** * ***** * * * **** * * ** *** ***** ** * **** ** * ** *** *** * ****
* * ** * * * ** *** * * * ** * ** *** * * * * * * ** * ** ** ***
**** * * * * * **** ** *** **** * ** * * * *** *** ** **** * * * * * (tab[i]==tab[j])
** *** * * ** ** ** *** * * *** * * * * * * *** * * ** * * * *
* ****** * ** * *** ** * * * * ****** * * * * * ** ** * ***** ** * * * *** ** * ** ** ***
* ** * ** ** * * * ** **** ** * ** * ** * **** * *** ** * * * * ** *** ***
* ** ***** *** * ** ** ** *** ********* ** * **
* * * *** *** * ** ** ** * * * * * *** * * **
* * *** * ** ***** ** ** *** * * **** *** * * *****
**** * * * * ****** ** * ** ** * ** * * * * ** * * **** **** * *
* ** * * ***** * * * ** ** * ** *** ** * * ** ** * ** * ** ** *
* ** * *** * * ** ** * * * * * * ** **** *
** * ****** * * **** * ** ** * * * ** * * ** * * *

    }
* *** * *** * *** ** *** *** *** * * **
** * ** ** **** **** ** ** ** ** * * ** *** ** * * ***
* * * *** *** ** *** * ** most occurring item:%d",o);
    return 0;
}
answered by (-168 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main(void)
{
    int tab[10],i,j,o,b,a,g,s;
    a=0;b=0;
    for (i=0;i<=9;i++)
    {
*** *** * * ** **** ** * * *** * ** * ** * *** * ** ** * ** *
    }
** **** * * *** * * * * * *
    for (i=0;i<=8;i++)
    {
*** * ** * **** ** ** **** * * * * * * ** * *** (j=i+1;j<=9;j++)
**** ** ** *** * ***** **** * * ** * *
* * * * * * * **** * *** *** * ** * * * *** ** * * ** * ** (g<tab[j])
* ** **** * * * *** ** **** ** * * * ** *** * * * *** * * * * *
* ** * * * *** ***** ****** * ** * ** ** ** *** **** *** ** ** * ** *** **** *** * ** *** ****** **
* ***** * * * * * ** ***** **** *** * * * ** * * ***
* *** * **** * ***** * ***** **** * ** * * *** ** * ****** * ****** * ***
* * * * * *** * * ** * * * ** * * ** ** * * * **** **
* * * ** ** * ** ** **** * * * * * * ** * * * * *** * * * * * ** ** **
*** *** * ** **** * ** *** *** * * * * ** ** ** * * * * * ****
** ** * *** * * ***** * ** * * * ** ***** ***** *** ** ** * ** * * (tab[i]==tab[j])
** * ** * * * * * * *** ***** *** *** ** * * * * ** * * ** *** **
** *** **** ** *** ** * * *** *** *** * * * * * * ** *** *** * ** ***** * *
** * **** * * * * * ** ** *** ** ** * * * ** *** * * *** ** ** *
* *** *** * * ** * **** ** * * **
****** * * *** * * * ** * * * ** ****** ** *****
* * ** * * **** * * * * * ** *** ** ** * *
* ** * * * *** ** * * * *** ** * ** ** *** *** * **** *
*** ** * * *** ** **** *** * * * ** * *** *** *** **** **** *** *** *
* **** * **** * ** * ****** * * * *** **

    }
** ** ** *** ** ****** * * * ** **
** * *** * *** * *** * * * ** ****** * **
* * *** * * * * * ** * * * most occurring item:%d",o);
    return 0;
}
answered by (-168 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Wrong output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main()
{
    int arr[10],i,greatest=0,smallest,j,counter=0,place=0,num=1;
    for(i=0;i<10;i++){
** * ** * *** * *** * ** * * * ******** ***** * * ******* * **
    }
    smallest=arr[0];
    for(i=0;i<10;i++){
** * * **** * * ** * *** * * * ** * *** * * *** * *
*** ***** *** * * * * * ***** * * * ** *
** ** * **** *** * ** *** * * ** ** **** ***** *** * **** ** ** ** ****
**** * * * * * * *** * *** * ** * *
* * ** ** * * ** ** ** * * ** ** ** * ** * *
*** * * ** ** * * * * ** * ** *** *** ****
*** ** * * ** * * * * * * *** ** * * * * * * ** *** ** ** * * * *
*** * * * * * ** ** ** * * *** * * ** * * **
*** ** *** **** * ** * * * * * *** * * *** ** * *** * *** * *
* * * ** * ** *** * ** * *** * ** * ***
** ******* * * ******* ** **** * * ** * *** ** ** * **** **** **** * ** *** * * * *
* ** * * * * * * ** ** ** * * *** ** *** **** * *** *** **
* ** ** ** *** * * * * * ** * * **** * ***** *** * ** * * ** * * ** *** * * *
* ** ** ** * ***** * ** * * * * * * * * *** * ** * ***** **** **** * * * *
**** * * * * * ** * * * * * **** **** ** * *
* ** *** **** * ** * ** * * ** ****** * * * ** ***** ** * ** ** *** * *
* ** * * ** * * *** * * *** * * * * *** * *** ** ** *** **
*** ** ** * * * ** *** * * *** **** ** **** * * * *** * * ** *** * *** *** ** *** * * * **
* * * * ** * ** * * * * * ** * * * * * * ** ** ** **** * * * *** * ** ** **** *
* *** ** * * ** * ** * * **** *** ** *** ** *** ** *
**** *** * * * **** * * *** ** * * ** ***** * * * ** * ***** * *
    }
* *** **** * ** ** * * * * ** * ** * * *** **** * ****
* * *** ** * * * * * * ***** ** ***** * * **
    printf("The most occurring item:%d",arr[place]);
    return 0;
}
answered by (-323 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdlib.h>

int main()
{
* **** * ** * ********** a[10],Greatest = 0,Smallest = 1000,i,j,x = 0,y = 0,k;
* * ** ***** * * * * ** *** = 0 ; i < 10 ; i++)
***** ** *** * ************* *** *** ** * *** * *** * ** * * * * *
** * * * *** * ** ** * = 0 ; i < 10 ; i++)
* *** * * **
*** *** * ** ** ** ***** ***** * ** > Greatest)
* *** ***** * * * **** ** ** ** ** * *** * ** * * * * *** * ** ** = a[i];
* * * ***** * * *** **** ** ** **** * * * * ** < Smallest)
*** ** *** ** * ** * * ** * * * * *** ** ** * * ** * ** ** ** ** = a[i];
    }
* * **** ** * * * * * *** * **** * ** * * *
**** * **** * * * * * * * * * ** * ** ** ** * *

* ** ** ** * * **** * * ** = 0 ; i < 10 ; i++)
    {
* ** ** ** ***** * ** * * * * * * ****** * = 0 ; j < 10 ; j++)
* **** *** ** **** * ** ***** ** * *** ** **
* * **** * ** *** * * ** ** **** * * ** * * ** ** * * *** ** *** * * == a[j])
* * * ** * *** * ** *** * * ** * ** ** **** ** ****** ** ** * *** ** *** * ** * *
* * ** ** *** * ***** * * * * * * *** ** **
** * **** * *** ** * *** ** * * ** * ***** > x)
* * * * * * * * ** * ** * *** * **
* **** **** * * **** * * ** * ** ** * * ** ** * * ** ** * * ** = a[i];
** ** ** *** *** * * * ** ** ** ** * ** * * * *** ****** ** *** * ** = y;
** **** ** *** ***** ** * * **** *** * * **
* *** * * * ** * * ** * ** ***** ***** **** * **** = 0;
    }
* **** **** * * * * * **** * *** most occurring item:%d",k);

** ** *** *** ****** ***** * 0;
}
answered by (-127 points)
0 0
prog.c: In function 'main':
prog.c:7:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
         scanf("%d",&a[i]);
         ^~~~~
prog.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf'
prog.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
prog.c:15:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
     printf("Greatest:%d\n",Greatest);
     ^~~~~~
prog.c:15:5: warning: incompatible implicit declaration of built-in function 'printf'
prog.c:15:5: note: include '<stdio.h>' or provide a declaration of 'printf'
0 like 0 dislike
Hidden content!
#include <stdlib.h>

int main()
{
* ** ** ** * ** * * * ** a[10],Greatest = 0,Smallest = 1000,i,j,x = 0,y = 0,k;
* * * **** * * ** * *** = 0 ; i < 10 ; i++)
*** *** *** *** * ** * * ** * *** ** ****** ** * *** * * ******** ** *
*** * ** * *** * * * = 0 ; i < 10 ; i++)
* * **** * * * ****
* **** *** ** *** *** *** ** ** *** *** *** * * ** *** > Greatest)
** * * ** * * * * * * * ** * ** * * *** * ****** ** * * *** ** * * *** ** * = a[i];
** * **** * * ** * * ** **** * * ** * < Smallest)
** *** * **** * * ***** * **** ** * * * * * ** * *** ** *** * * *** * = a[i];
    }
*** * * ** ** * * * * * ** **** ** *
* ***** ** * * * * ** * * * * * *** *** ***

* ** * ** * *** * * * * = 0 ; i < 10 ; i++)
    {
* * * ** ** ** ** ** * * * * ***** ***** * ** ** * = 0 ; j < 10 ; j++)
* **** * * ** **** * * * * * * * * *
* * * * ** **** * * * ****** * * * * ** ** **** * * ***** ** **** ** ** * * * == a[j])
** * * ***** * * * * * ** ** * *** * ** ** ** ****** * * * * ** *** *** ** *
* * ***** * * **** *** ** ** *** ** * *
** ** * *** ** * ** **** * * ** *** * * > x)
* ** ** * * ** ****** *** * * * *******
* ** * ***** * * * * ******* * ** * * *** * ** **** * * * = a[i];
** * ** * ** ** ** *** ** * * **** **** * *** * *** *** *** * ** *** * = y;
**** *** * * * ** * * * ** ** * * **** **
** * * * ** ** * ** *** ** ***** * * ** = 0;
    }
* **** * * ** ** *** * *** most occurring item:%d",k);

** * * * **** * ** ** * * 0;
}
answered by (-127 points)
0 0
prog.c: In function 'main':
prog.c:7:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
         scanf("%d",&a[i]);
         ^~~~~
prog.c:7:9: warning: incompatible implicit declaration of built-in function 'scanf'
prog.c:7:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
prog.c:15:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
     printf("Greatest:%d\n",Greatest);
     ^~~~~~
prog.c:15:5: warning: incompatible implicit declaration of built-in function 'printf'
prog.c:15:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.6.34
©2016-2024

Related questions

0 like 0 dislike
56 answers
[Exercise] Coding (C) - asked Nov 29, 2017 in Chapter 8: Arrays by semicolon (5.2k points)
ID: 34913 - Available when: 2017-11-30 18:00 - Due to: Unlimited
| 1.8k views
0 like 0 dislike
46 answers
[Exercise] Coding (C) - asked Nov 29, 2017 in Chapter 9: Functions by semicolon (5.2k points)
ID: 34912 - Available when: 2017-12-14 18:00 - Due to: Unlimited
| 1.7k views
0 like 0 dislike
47 answers
[Exercise] Coding (C) - asked Dec 7, 2017 in Chapter 9: Functions by semicolon (5.2k points)
ID: 35785 - Available when: 2017-12-07 18:00 - Due to: Unlimited
| 1.5k views
12,783 questions
183,443 answers
172,219 comments
4,824 users