How to Create an Output Program!

On this page it will be teaching you how to create a program that has an output. This program will take place in Console Appilcation in Visual Studios. An Output is a program when running will allow the user to type in, let's say, their name and age. The program will remember the name and age and reply back to the user. Neat eh? To begin, you the Technics I showed you on the page of Visual Studios and create a project!

Once you have completed that step, our first step is going to be how to get the computer to ask the user's name and remember it.

The red underline underneath Console.WriteLine... is the first thing that the program will show when it is running. It is asking the User what is his/her name is. The Blue underline is the code that would allow the person to write their name. The Green underline is a code that allows the computer to remember the user's name. Press Start once finished to try!

Our next step is how to insert our age into the program. It will get tricky!

The Red circle is declaring the variable that we will be using for this program. The red underline is the cammand of the program to ask the user what is his/her age. The Blue undeline is a code that is slightly complicated. This code will know if the user has put in a integer...a whole number, not decimal or letters. This code will not proceed if they did not put in the integer the computer will say, please try again, if they had it would proceed on to the next line of code. Neat?

This is the last step...These two lines will put the finishing touches to the program. The first line is writing the last sentence. It is a bit different to how we are originally writing a line. Concatinating is when the code supplies two strings and unite then together in a form of a sentence. This is call Concatinating. It is use by supplying the user's name and his/her age to the sentence. The last line must always be there for every Console Application program we used because this is what keeps the black screen open and allow the program to be read, without this line of code, the black screen will flash and then your back to your page where you are coding. Press Start and try your new program!

Here is what the program should look like!