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)
1
Expert's answer
2012-12-20T07:36:21-0500
#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();
Comments
Leave a comment