HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50903 - Basic Math Calculator

Guest
• Review clarifications (2)

Section problems

• 50359 - Mode of a Series
• 50539 - Number of Chairs - 2
• 50532 - Close City
• 50462 - Class Average (3 Grades)
• 50288 - Even numbers in even posit...
• 50372 - Number Quadruplets
• 51007 - Function f(x)
• 50896 - Sum of Even Numbers
• 50903 - Basic Math Calculator
• Cineplexx
• Cirku Belluci
• 50659 - Covariance Matrix
• El Clasico
• 50657 - Permutations and Combinat...
• 50658 - The Message
• 50916 - Ascending Numbers
• 50917 - Descending Numbers

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Basic Math Calculator

Create a calculator that takes a number, a basic math operator (+, -, *, /) and a second number all from user input, and have it print the result of the mathematical operation.

Input: In the first line you will get a number, a math operator (+, -, *, /) and second number.

Output : Result of the calculation.

Sample Input1:

Sample Input2:

Sample Input3:

5 + 7

8 / 5

6 / 0

Sample  Output1:

Sample  Output2:

Sample  Output3:

12

1.6

Error: Division by zero!

 

Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî âûïîëíèòü âõîä.

www.contester.ru