Answer to Question #20912 in C++ for zaima hussain
Question #20912
Write a program to populate an array using a separate user defined functions, until them largest and second largest numbers of the array using a separate user defined function. ( use call by reference to return two values)
Expert's answer
#include <iostream>
#include <conio.h>
#include <time.h>
using namespace std;
int arrayofnumbers[100];
void FillArray(){
for(int i=0;i<100;i++){
arrayofnumbers[i]=i;
}
}
//main function
int main()
{
FillArray();
getch();
return 0;
}
Need a fast expert's response?
Submit orderand get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment