Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
p1
using system; class calculator { float a,b; char operator; void getdata() { a=Convert.ToFloat(Console.Readline()); b=Convert.ToFloat(Console.Readline()); operator=Convert.ToChar(Console.Readline()); } } void calc() { if(operator=='+') { Console.WriteLine("The sum of two number is"+a+b); } else if(operator=='-') { Console.Writeline("The difference of two number is"+a-b); } else if(operator=='*') { console.wrieline("The product of two number is"+a*b); } else if(operator=='/') { console.writeline("The quatient of two number is"+a/b); } } class program { static void Main() { calculator C=new calculator(); C.getdata(); C.calc(); } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
pyramidnos
Find Highest,Lowest and average using two dimensional arrays
Bridge Design Patern
JagArray
eze
test
Yoo
otro
world
Bases5
Please log in to post a comment.