C Program to find largest of n numbers using Array

C Program to find the largest of n numbers using Array

We can write a C Program to find largest among n numbers using Array. For example:  if we  given 7 input  numbers as  65, 76, 54, -98, 35, 23, 93, then  the largest of 7 numbers using Array is 93. The below given C program will find the largest (biggest, greatest or highest or maximum) of n numbers using array.  Kindly check out the program to find the largest (biggest, greatest or highest or maximum) of n integers. The questions to find the largest (biggest, greatest or highest or maximum) of n numbers can be asked as

1). C Program to find Largest element in array in C programming
2). C program to find maximum element in array
3). C Program to find Largest number in an Array
4). C Program to find Largest element from the array
5). C Program to Find maximum element in an Array
6). C Program to Find Largest Element of an Array
7). Finding the Largest number in an array of integers
8). C program to find the Largest integer in a list of integers

largest (biggest or greatest or highest or maximumof n numbers (Using Array)Program


    #include<stdio.h>
    #include<math.h>
    int main(){
                   int n, z, large, array[20];
                   printf(" How many Integer numbers : ");
                   scanf("%d", &n);
                   z=n;
                   if(n>0){
                   printf("\n Enter the numbers one by one : ");
                   for(;n>=1;n--)
                   scanf("%d", &array[n]);
                   large = array[1];
                   n=z;
                   for(;n>=1; n--){
                   if(large < array[n])
                   large = array[n];
                   }
                   }
    printf("\n The largest of %d numbers is %d", z, large);
    return(0);
    }

  


Sample Output:

                   How many Integer numbers : 10
                   Enter the numbers one by one : 56 93 45 24 95 16 -47 29 99 31
                   The largest of 10 numbers is 99

Other Related C Programs :


* C Program to find whether the given number is Odd or Even

* C Program to find the Sum of Odd Digits

* C Program to find the Sum of Even Digits

* C Program to find the Sum of Even and Odd Digits,

* C Program to Display Odd digits

* C Program to Display even digits

* C Program to Display Odd Numbers,

* C Program to Display Even Numbers,

* C Program to Check whether the given number is Armstrong number

* C Program to display the Armstrong numbers in Range

* C Program to display the Armstrong numbers between 1 and 1000

* C Program to check perfect number, perfect numbers in range

* C Program to Check Prime number, Prime numbers between 1 and 100

* C Program to display the Prime numbers in a Range

* C Program to display the Sum of Prime numbers

* C Program to Check Strong number

* C Program to display the Strong number in Range

* C Program to Check whether the given number is polindrome number or not

* C Program to Check polindrome number using for loop

* C Program to Check polindrome number using Recursion

* C Program to  check whether the given string is polindrome or not

* C Program to find the Roots of Quadratic equation

* C Program to display Fibonacci Series

* C Program to display the Fibonacci Series using an array

* C Program to display the Fibonacci Series using while loop

* C Program to find the Sum of Fibonacci Series, Factorial of Number

* C Program to find the Factorial without using Recursion

* C Program to find the Factorial using Pointers

* C Program to find the Factorial using Function

Bookmark and Share