0
using a for Loop initialise the contents of a 10 element array of the type int to 0. using another for loop print the contents of the array to the screen.
how can i rezolve this question
3 Respuestas
0
int myArray[10];
for(int i = 10; i != 0; myArray[--i] = 0);
for(int i = 0; i != 10; cout << myArray[i++]);
0
or:
int myArray[10];
int i = 10;
for(; i != 0; myArray[--i] = 0);
for(; i != 10; cout << myArray[i++]);
0
string[] strArr= new string[10];
for(int i = 0; i < 10; i++)
strArr[i] = Console.ReadLine();
for(int i = 0; i < 10; i++)
Console.WriteLine(strArr[i]);
Hope that helps 😀😁