|
|||
Arithmetic Operations #1Write a program that reads integers and operators of the C programming language from the standard input line by line, performs the operation indicated by the operator on the scanned/read values and writes the result to the standard output. Input Specification
The input contains several test cases. The first line of the input contains a positive
integer n indicating the number of test cases. Each of the following lines describes
a test case. Each test case is a line in the form “x op y”,
where x and y are integers, while op is one of the following
integer arithmetic operators of the C programming language: Output SpecificationFor each test case, the program must write a single line containing the result of the operation x op y specified in the test case. Sample Input
Output for Sample Input
Possible solutions: main1.c and main2.c.
Acknowledgement
This work was supported by the construction EFOP-3.4.3-16-2016-00021. The project was supported by the European Union, co-financed by the European Social Fund.
|
|||
University of Debrecen; Faculty of Informatics; v. 03/01/2019 |