Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("First Number");
- int firstnumber = Int32.Parse(Console.ReadLine());
- Console.WriteLine("Second Number");
- int secondnumber = Int32.Parse(Console.ReadLine());
- Console.Write("Now your method, + for addition, / for division, * for multiplication and - for subtraction");
- string wayOfThinking = Console.ReadLine();
- if (wayOfThinking == "+")
- {
- int additionresult = firstnumber + secondnumber;
- Console.Write("your answer is" + additionresult);
- }
- if (wayOfThinking == "-")
- {
- int subtractionresult = firstnumber - secondnumber;
- Console.Write("your answer is" + subtractionresult);
- }
- if (wayOfThinking == "*")
- {
- int multiplicationresult = firstnumber * secondnumber;
- Console.Write("your answer is" + multiplicationresult);
- }
- if (wayOfThinking == "/")
- {
- int divisionresult = firstnumber / secondnumber;
- Console.Write("your answer is " + divisionresult);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement