FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 107   



Following program shows you how to scan name of user and say hello with name
In this program we get name from user using console method and prints hello with that name using Console.WriteLine()

using System;

class MainClass {
  public static void Main (string[] args) {
    Console.WriteLine ("Please enter your name:");
    string name = Console.ReadLine();
    Console.WriteLine("Hello {0}", name); 
   }
}

Output:

Please enter your name:
 Tom
Hello Tom



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News