Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication4
- {
- class Sum
- {
- static void Main(string[] args)
- {
- Console.Write("number1= ");
- string number1 = Console.ReadLine();
- Console.Write("number2= ");
- string number2 = Console.ReadLine();
- Console.Write("number3= ");
- string number3 = Console.ReadLine();
- int num1 = Int32.Parse(number1);
- int num2 = Int32.Parse(number2);
- int num3 = Int32.Parse(number3);
- int sum = num1 + num2 + num3;
- Console.WriteLine("The sum of {0}, {1} and {2} is {3}", num1, num2, num3, sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment