tabing over variables

Reply Forum
Forum postDavidY @ 2008-11-30 00:40:12
ReplyReply to
hi i need help with 2 things

how do you string this in only two statements

String studentName = "John Do";
int StudId = 400346;
double gradePoint = 3.45;

so that it comes out to something like this

Student Name Student Id Grade Point
XXXXXXX 999999 9.99

i have so far

Console.Write("Student Name\tStudent Id\tGradePoint\n" );
Console.WriteLine(studentName+StudId+gradePoint) ;

but i can't tab over the data



Forum postWebmaster @ 2008-12-01 14:30:46
ReplyReply to
Aren't you simply looking for something like this?

Console.WriteLine(studentName + "\t" + StudId + "\t" + gradePoint);

?











© net-tutorials.com 2006 - 2012

MailContact net-tutorials.com