-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1.4example1.cs
42 lines (34 loc) · 1.04 KB
/
1.4example1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
namespace Examples
{
class Program
{
static void Main(string[] args)
{
string name;
string city;
sbyte age;
int pin;
// \n is used for line-break
Console.WriteLine("Enter your name\n");
name = Console.ReadLine();
Console.WriteLine("Enter Your City\n");
city = Console.ReadLine();
Console.WriteLine("Enter your age\n");
age = sbyte.Parse(Console.ReadLine());
Console.WriteLine("Enter your pin\n");
pin = Int32.Parse(Console.ReadLine());
// Printing message to console
//formatting output
Console.WriteLine("==============");
Console.WriteLine("Your Complete Address:");
Console.WriteLine("============\n");
Console.WriteLine("Name = {0}", name);
Console.WriteLine("City = {0}", city);
Console.WriteLine("Age = {0}", age);
Console.WriteLine("Pin = {0}", pin);
Console.WriteLine("===============");
Console.ReadLine();
}
}
}