Ekim0710

Untitled

Jan 18th, 2021 (edited)
526
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         Console.WriteLine("First Number");
  8.         int firstnumber = Int32.Parse(Console.ReadLine());
  9.        
  10.         Console.WriteLine("Second Number");
  11.         int secondnumber = Int32.Parse(Console.ReadLine());
  12.        
  13.         Console.Write("Now your method, + for addition, / for division, * for multiplication and - for subtraction");
  14.         string wayOfThinking = Console.ReadLine();
  15.        
  16.         if (wayOfThinking == "+")
  17.         {
  18.          int additionresult =  firstnumber + secondnumber;
  19.             Console.Write("your answer is" + additionresult);
  20.         }
  21.        
  22.         if (wayOfThinking == "-")
  23.         {
  24.          int subtractionresult =  firstnumber - secondnumber;
  25.             Console.Write("your answer is" + subtractionresult);
  26.         }
  27.        
  28.         if (wayOfThinking == "*")
  29.         {
  30.          int multiplicationresult =  firstnumber * secondnumber;
  31.             Console.Write("your answer is" + multiplicationresult);
  32.         }
  33.          
  34.        
  35.         if (wayOfThinking == "/")
  36.         {
  37.          int divisionresult =  firstnumber / secondnumber;
  38.             Console.Write("your answer is " + divisionresult);
  39.         }
  40.        
  41.        
  42.     }
  43. }
RAW Paste Data