Advertisement
Felanpro

Simple calculator

May 28th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace TrainingC_Sharp
  8. {
  9.     class Program
  10.     {
  11.         static void Main()
  12.         {
  13.  
  14.             Console.WriteLine("Number 1: ");
  15.             int x = int.Parse(Console.ReadLine());
  16.  
  17.             Console.WriteLine("Number 2: ");
  18.             int y = int.Parse(Console.ReadLine());
  19.  
  20.             Console.WriteLine(x + y);
  21.            
  22.  
  23.             Console.ReadLine(); //We have this so the program pauses and don't closes directly when you open it.
  24.  
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement