Virtual university helping material, Quiz, Assignments, past papers and Handouts.
CS201 Assignment No2 Complete Solution
#include<iostream>
#include<stdlib.h>
#include<time.h>
using namespace std;
void generateArray(int inArr[7][7])
{
for(int i=0;i<7;i++)
{
for(int j=0;j<7;j++)
{
inArr[i][j] = rand() % 500 + 1;
}
}
}
void showArray(int inArr[7][7])
{
for(int i=0;i<7;i++)
{
for(int j=0;j<7;j++)
{
cout<<inArr[i][j]<<"\t";
}
cout<<"\n";
}
}
void evenArray(int inArr[7][7])
{
for(int i=0;i<7;i++)
{
for(int j=0;j<7;j++)
{
if(inArr[i][j]%2==0)
{
cout <<inArr[i][j]<<"\t";
}
}
}
}