CSharp examples for Language Basics:int
Convert console input to int and add ten
using System;/*from ww w. j av a 2 s. c o m*/ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { // Input Console.Write("Enter a number: "); string input = Console.ReadLine(); int number = Convert.ToInt32(input); // Calculation number = number + 10; // Result output Console.WriteLine("Number ten more greater is: " + number); } }