Program To Describe The Basic Input
using System;
class BasicInput
{
public static void Main()
{
Console.Write("Enter your name:- ");
string nam = Console.ReadLine();
Console.Write("Enter your age:- ");
int age = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter your Gender (M/F):- ");
char gen = (char)Console.Read();
Console.WriteLine("Hello " + nam);
Console.WriteLine("Your age is " + age);
Console.WriteLine("Your gender is " + gen);
}
}
OUTPUT
Program To Describe The Basic Input
Reviewed by Baljeet Singh
on
12:18
Rating:

No comments: