Advertisement
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 Rekenmachine
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Geef een getal:");
- string sGetal1 = Console.ReadLine();
- Console.WriteLine("Geef nog een getal:");
- string sGetal2 = Console.ReadLine();
- Console.WriteLine("Voer een plus in:");
- string sOperator = Console.ReadLine();
- int iGetal1 = int.Parse(sGetal1);
- int iGetal2 = int.Parse(sGetal2);
- if (sOperator == "+")
- {
- int iUitkomst = iGetal1 + iGetal2;
- Console.WriteLine("de uitkomst van de soms is {0} + {1} = {2}", iGetal1, iGetal2, iUitkomst);
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement