Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  CS EXTRA CREDIT AMMAR KHOMUSI
Language: C/C++
Code:
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

void loadAV(int Array[],int SIZE);

int main()
{
   srand(time(NULL));
   const int SIZE=70;
int nos[SIZE];
loadAV(nos,SIZE);

return 0;
}
void loadAV(int Array[],int SIZE)
{
    int cnt = 0;
    for(int i=0;i<SIZE;i++)
    {
    Array[i]=rand() % 71 + 3;  
    cout<<"["<<i<<"] = "<<Array[i]<<"\t";
    cnt++;
    if(cnt % 5==0)
    cout<<endl;
   }
}


Comments: