- Joined
- Apr 7, 2017
- Posts
- 8,015
- Solutions
- 1
- Reaction
- 4,370
- Points
- 2,382
Ano po mali dito ?
Gagayahin kasi namin tong sa pic.
Gagayahin kasi namin tong sa pic.
C#:
class Program
{
static void Main(string[ ] args)
{
double firstnum;
double secondnum;
double answer;
string ops;
Console.Writeline("Enter num1:");
firstnum = Double.parse(Console.ReadLine());
Console.Writeline("Enter your desired operator: {+}, {-}, {*}, {/} ");
ops = Console.ReadLine();
Console.Readkey();
Console.Writeline("Enter num2:");
firstnum = Double.parse(Console.ReadLine());
if(ops == "+")
{
asnwer = firstnum + secondnum;
Console.Write(answer);
}
if(ops == "-")
{
asnwer = firstnum - secondnum;
Console.Write(answer);
}
if(ops == "*")
{
asnwer = firstnum * secondnum;
Console.Write(answer);
}
if(ops == "/")
{
asnwer = firstnum / secondnum;
Console.Write(answer);
}
Console.ReadKey();
}
}
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.