Thanks eSpeX
I'm really confused on where to begin besides a line of code asking for the user's input.
What are you having difficulty with?
Most of it in general. Like, how can I create a table like this in C#? I've only created lines of code.
The format will take some trial and error to get perfectly lined up. However you can generally create a table using \t <tab> and \n <new line> within the quotes of your print statement.
Thank you, I'll try to incorporate that into the code.
You're welcome.
This is a link to an article discussing escape characters in C#. I am relatively certain that they are the same as those in C and C++, but there is a handy table here for referencing. http://www.codeproject.com/Articles/371232/Escaping-in-Csharp-characters-strings-string-forma
I managed to get the x and y axis down. Now, I don't know how to get the body. @eSpeX
Use a loop, probably a for, and print your row, then when your increment gets to your limit add a \n and repeat.
I'm not sure how I can create a loop and have the two user inputs multiply together and continue down?
It looks to me like you are creating a "times" table, so you take the input for your 'x' and your 'y' and then generate the table.
You can have your last operation be anything, instead of c++ why not use c=x*y or something
Hmm.. I didn't think that was possible. Let me try that real quick. Thank you
Welcome.
for (int c = Var * Var2; c <= 90; c = a*b) { Console.WriteLine(c); } This doesn't seem to work. I get an error saying that a and b don't exist in context.
Where are they defined?
Just inside your for loops, so they do not exist outside of that loop.
Ohh, I see. How can I use them from the previous loops into the new one?
You need to declare your 'a' and 'b' outside the loop and use an increment variable to count through your loop, then you can manipulate the 'a' or 'b' variable within that loop.
Ok, thanks. I kind of get it now
Join our real-time social learning platform and learn together with your friends!