You are on page 1of 2

PROGRAM 05 (To Pick Out the Greatest Number)

Aim of the Program: A Program To Pick Out the Greatest Number

#include <iostream>

using namespace std;

int main()

int i, temp;

int num[] = {5, 1, 6, 8, 3, 12, 17, 9, 10, 23, 15};

temp = num[0];

for (i = 1; i < 11; i++)

if (temp < num[i])

temp = num[i];

cout << "\n the greatest number is: " << temp;

system("pause > 0");

return 0;

Output:

the greatest number is: 23


a=a*c

You might also like