Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Text;
- using System.Threading.Tasks;
- namespace Tullyinputs
- {
- class Exercise1
- {
- string userinput = Console.Read(); //Creates string "userinput" containing what the user inputs
- Console.WriteLine("Well done you have typed in" + userinput); //Writes "well done..." + whatever the use types
- }
- class Exercise2
- {
- Console.WriteLine("Please enter a word...");
- string userinput = Console.Read(); //Creates string "userinput" containing what the user inputs
- Console.WriteLine("Well done you have typed in" + userinput); //Writes "well done..." + whatever the use types
- Console.WriteLine("Aren't I clever");
- }
- class Exercise3
- {
- Console.WriteLine("Please enter your username");
- string username = Console.Read(); //Creates string "username" containing what the user inputs
- Console.WriteLine("Please enter your password");
- string password = Console.Read(); //Creates string "password" containing what the user inputs
- Console.Write("You have just entered your username as ");
- Console.Write(username);
- Console.Write(" and your password as ");
- Console.WriteLine(password);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement