Run Code
|
API
|
Code Wall
|
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
test
C++ lesson
Whats Wrong in Here ?
animal
1.3 Basics: interfaces
dfgthyjui8u7yt5rewsx
Reverse Array
Hello world
Reference Type parameter by Ref vs. Normal
Plt-D v.0.8.1