The Student Room Group

Need some help with this C# programming question

Write a command line program which lets the user do quick mathematical operations on the command line. The first argument they supply is the operation to perform, the remaining arguments are the values to use for that operation. The number of values supplied can vary depending on the operation. For example:
./maths add 2 3 7 => outputs 12
./maths div 6 2 => outputs 3
./maths avg 10 543 12 765 234 82 -34 => outputs 7230.29
Original post by Agent456
Write a command line program which lets the user do quick mathematical operations on the command line. The first argument they supply is the operation to perform, the remaining arguments are the values to use for that operation. The number of values supplied can vary depending on the operation. For example:
./maths add 2 3 7 => outputs 12
./maths div 6 2 => outputs 3
./maths avg 10 543 12 765 234 82 -34 => outputs 7230.29

What do you have for this so far? :smile:
Reply 2
Original post by RainbowLapras
What do you have for this so far? :smile:

I've done it anyways, I had some help from someone in my lab
Original post by Agent456
I've done it anyways, I had some help from someone in my lab

Ah fantastic, glad to hear it! :biggrin:

Quick Reply

Latest

Trending

Trending