TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Name and age display in c#
Vijayaragavan S
Aug 05
2016
Code
30.8
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using System;
class Program
{
static
void Main()
{
int
a;
string b, c, d;
//
Read
a
name
Console.Write(
"Enter your name : "
);
b=Console.ReadLine();
//
Read
Age
Console.Write(
"Enter your age : "
);
a =
Convert
.ToInt16( Console.ReadLine());
//Display formatted
output
Console.WriteLine(
"Your name is "
+ b +
", age is "
+ a);
//Waiting fot
output
view
Console.ReadKey();
}
}
C# basics
Reading input from the user
console Application