+ 3
HOW TO MAKE A CALCULATOR USING ANY LANGUAGE?
I want to know how to make calculator.
4 Answers
+ 1
using capslock is like yelling to me. āŗļø
+ 1
do {
Console.Write("x = ");
string str = Console.ReadLine();
if (str == "exit")
break;
int x = Convert.ToInt32(str);
Console.Write("y = ");
int y = Convert.ToInt32(Console.ReadLine());
int sum = x + y;
Console.WriteLine("Result: {0}", sum);
}
while (true);