- Joined
- Nov 24, 2004
- Messages
- 147
- Reaction score
- 2
Hi everyone, Whats wrong with my code?
static void main()
{
int count = 0;
string[] test = new string[20];
int[] num1 = new int[20] ;
Console.Write("Test For String");
test[count] = Console.ReadLine();
Console.Write("Number 1");
num1[count] = int.Parse(Console.ReadLine());
Console.WriteLine(count + " " + test[count] + " " + num1[count]);
}
}
}
I been thinking how to store my results in a array for 5 times (with looping),
OUTPUT:
1 Hello 5
2 Everyone 4
3 From 3
4 This 2
5 Forum 1
Anyone know how to get this results?
static void main()
{
int count = 0;
string[] test = new string[20];
int[] num1 = new int[20] ;
Console.Write("Test For String");
test[count] = Console.ReadLine();
Console.Write("Number 1");
num1[count] = int.Parse(Console.ReadLine());
Console.WriteLine(count + " " + test[count] + " " + num1[count]);
}
}
}
I been thinking how to store my results in a array for 5 times (with looping),
OUTPUT:
1 Hello 5
2 Everyone 4
3 From 3
4 This 2
5 Forum 1
Anyone know how to get this results?