Hi people I just started doing c++ and Im instructed to do this without any background hope you guys help me thanks.
This is the Instruction:
a 10 x 15 array is filled with random numbers between 10 and 100.
the 2D array is displayed on the screen in tabular form.
the user is asked to enter two numbers between 10 and 100
the program counts how many times the two numbers inputted occurs in the 2d array and displays the count on the screen.
the main() function should only contain variable declarations and functions calls.
this is what I did so far.
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int i;
int a;
for (i = 1; i <= 150; i++) {
printf("%d ", 10 + (rand() % 90));
if (i % 15 == 0) {
printf("\n");
}
}
printf("\n Enter two numbers between 10 and 100: \n");
scanf("%d",a);
}