answersLogoWhite

0


Best Answer

#include <iostream>

using std::cout;

using std::cin;

using std::endl;

int main()

{

int max;

int num;

for (int counter = 0; counter<15; counter++)

{

cout <<"Enter a number: ";

cin >> max;

cout << "Enter another number: ";

cin >> num;

if (num > max)

num = max;

cout << "The largest number is " <<max;

}

return 0;

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to find out largest and smallest in a list of given numbers using arrays?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the 2 digit number that has the largest number of arrays?

60 is one of 5 numbers that has 12 arrays.


Which numbers have the most arrays and why?

Even numbers


What are numbers that make square arrays?

no


What do we call the numbers that cannot be arranged into 2-row arrays?

we can call the number that cannot be arranged into 2- row arrays multiple arrays.


What do you call numbers that can be arranged into two rows arrays?

Even numbers.


How do you determine matrices?

They are simply rectangular arrays of numbers.


What are numbers that can be arranged into 2 row arrays?

0,2,4,6,8,10,12,14,16,18,20


How can you do the same thing as the program below but using strings and arrays in C language?

Program below?!


What do we call numbers that cannot be arrenged into 2-row arrays?

Odd numbers.


Write a program to read your name and reverse it using arrays?

abdulrahman


How do you create a program in visual basic?

arrays programms in visual basic


Write a program to find the largest of n numbers in c?

Without Using Arrays Program: #include&lt;stdio.h&gt; main() { int n,m,i,max; printf("How many numbers(n) you going to enter:"); scanf("%d",&amp;n); printf("Enter the numbers:"); scanf("%d",&amp;m); max=m; for(i=2;i&lt;=n;i++) { scanf("%d",&amp;m); if(m&gt;max) max=m; } printf("The Largest Number is %d",max); } Output: How many numbers(n) you going to enter:5 Enter the numbers: 25 410 362 5 56 The Largest Number is 410 With Using Arrays Program: #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int max_num(int a[],int n); int max,i,n; int a[50]; clrscr(); printf("Enter n number:"); scanf("%d",&amp;n); printf("Enter the numbers:"); for(i=0;i&lt;n;i++) scanf("%d",&amp;a[i]); max=max_num(a,n); printf("The largest number is %d",max); getch(); } int max_num(int a[],int n) { int i,m=0; for(i=0;i&lt;n;i++) { if(a[i]&gt;m) m=a[i]; } return m; } output: Enter n number:10 Enter the numbers: 123 456 789 963 852 147 5 56 600 753 The largest number is 963