C# Tutorial for Beginners 1 - Input and Output to Console











1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;

namespace MyProject.Examples
{
class ExampleOne
{
static void Main()
{
Console.Write("Please Enter number 1 ");
int x = int.Parse(Console.ReadLine());

Console.Write("Please Enter number 2 ");
int y = int.Parse(Console.ReadLine());

int z = x + y;

Console.Write("The Sum of {0} and {1} is {2} ", x, y,z);
Console.ReadKey();
}
}
}
















-------------------------------------------------------------------------

Searches related to C# Input and Output to Console

c# console application input output

c# console get input

c# console output to file

Beginner: C# input output program issues

 Console Input Output - C# Fundamentals

c# console output color

c# view console output

c# file input output


Comments