I know for most of you guys out there this might be a simple task. I am taking a programming class and need some help. Here is the question:
Write a C# program that computes and stores the first 20 prime numbers in a single dimensional array. Use a loop to display the array index plus 1 and the value of the prime number at that index.
I think a have the first part solve but I do not understand what the second part is. Here is what I have so far:
private void btnOk_Click(object sender, System.EventArgs e)
{
int limit = 20;
int num = 2;
int div;
string display;
// Define and initialize arrays to hold data
display = " Array Index Prime Number";
;
}