answersLogoWhite

0


Best Answer

Someone's coursework?! This function is for an array of integers, the length of the array is Count.

int MaxInt(NumArray as *int, Count as int)

{

int Inst;

int Result;

Result = NumArray[0];

for (Inst=0;Inst

{

if(NumArray[Inst] > Result)

{

Result = NumArray[Inst];

}

}

return Result;

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write an algorithm to find max of 10 numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a algorithm and flowchart to find largest among N numbers?

Max = 0For K = 1 to NIf Number(K) > Max then Max = Number(K)Next KPrint Max


Write an Algorithm for multiplication table of an integer?

int firstNumber,secondNumber for(firstNumber = min; firstNumber <= max; firstNumber++); { for(secondNumber = min; secondNumber <=max; secondNumber++); int result firstNumber * secondNumber; }


Write a C plus plus program and flow chart to find the largest of the 3 numbers?

To find the largest of three numbers, first find the largest of two numbers: int max (int x, int y) { return x<y?y:x; } Now you can use this one function to find the largest of three numbers: int max (int x, int y, int z) { return max (max (x, y), z); }


Write a c program to find the sum of numbers between given limits?

int sum (int min, int max) {return (max-min+1)*(max+min)/2;}


How do you find a largest algorithm in c plus plus?

#define max (a, b) ((a) >= (b)) ? (a) : (b)


How do you write a c program to find largest of 3 numbers using pointers?

Find the largest of two, then find the largest of that value and the third value. int* max (int* a, int* b) { return (a*) > (b*) ? a : b; } int* max_of_three (int* a, int* b, int* c) { return max (max (a, b), c); }


How do you write a c program to find biggest among two numbers using conditional operator?

int max (int a, int b) { return a>b?a:b; }


What is the algorithm for average of three numbers?

int secondmax (int a[], int n){int i, max, second;for (i=0; imax) second= max, max= a[i];else if (i==1 a[i]>second) second= a[1];}return second;}int middle (int a[3]){return secondmax (a, 3);}


C program to find the largest among three numbers using ternary operator?

max = a > b ? a : b; max = max > c ? max : c;


Where can I find out what my vo2 max is?

You can find out what your vo2 max is in many different places. There are various websites dedicated to finding these numbers for a more effective workout.


Find large number in the given two numbers?

int max = a>b?a:b; // set max to the larger of a and b


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

Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }Assuming the numbers are integers, and they are stored in an array called myArray. The following has not been tested, but gives the general idea: int max; max = myArray[0]; for (int i = 1; i < myArray.length(); i++) } if (myArray[i] > max) max = myArray[i]; System.out.println(max); }