light
light
CC#
Created by light on 3/15/2024 in #help
simple calculator
wait i didnt? mb
12 replies
CC#
Created by light on 3/15/2024 in #help
simple calculator
but how can i like when i say Y it would repeat the code again?
12 replies
CC#
Created by light on 3/15/2024 in #help
simple calculator
string value; int res; Console.WriteLine("enter an number lol"); int number1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("enter another number"); int number2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("put ,/,-,+"); string symbol = Console.ReadLine(); switch (symbol) { case "": res = number1 * number2; Console.WriteLine(res); break; case "/": res = number1 / number2; Console.WriteLine(res); break; case "+": res = number1 + number2; Console.WriteLine(res); break; case "-": res = number1 - number2; Console.WriteLine(res); break;
} Console.WriteLine("wana continue (y) (n)"); value = Console.ReadLine(); while (value == "y" || value == "Y") ;
12 replies
CC#
Created by light on 3/15/2024 in #help
simple calculator
i got it
12 replies