TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Khoi
NA
18
0
How to show results horizontally
Oct 31 2009 6:32 AM
Below is my code and I expect the numbers show horizontally, but they show vertically. Please advise. Thanks
{
class Program
{
static void Main(string[] args)
{
int[] Array1 = { 2, 3, 4 };
int[] Array2 = { 1, 2, 3 };
int[] Array3 = new int[3];
Console.WriteLine("\n The Contents of Array1 is: ");
for (int i = 0; i < 3; i++)
{
Console.WriteLine("{0} \t", Array1[i]);
}
Console.WriteLine("\n The Contents of Array2 is: ");
for (int i = 0; i < 3; i++)
{
Console.WriteLine("{0} \t", Array2[i]);
}
for (int i = 0; i < 3; i++)
{
Array3[i] = Array1[i] - Array2[i];
}
Console.WriteLine("\n The result of sub is : ");
for (int i = 0; i < 3; i++)
{
Console.WriteLine("{0} \t", Array3[i]);
}
Console.ReadLine();
}
}
}
Reply
Answers (
4
)
Converting the objects into appropriate format
Need a urgent help!!!!!!