subject

1. Accept input from a) Standard input (loop for waiting next input after printing the computation result) b) Text file (file name: input. txt with multiple lines of arithmetic expression) 2. The input string is an arithmetic expression including parentheses () and only has one line a) The operator and operand may not have a space character as the separator b) For example, (10.1+200 – 4.5x 5.5)/(2 -3 x5) c) If the input string has syntax error, terminate the program and tell what is wrong. 3. The operand can be an integer or a floating-point value and also negative number. 4. The operators include +, -, x, / and ! (factorial) 5. If the output is not an integer, round to 4 decimal places. a) If using command line or Eclipse console i. Input: (-20-10.1+200 – 4.5x 5.5)/(2 -3 x5) ii. Output: = -11.1654 b) If using a text file (input. txt) as input, you should create an output file (output. txt) i. Input: (-20-10.1+200 – 4.5x 5.5)/(2 -3 x5) ii. In output file: Input: (-20-10.1+200 – 4.5x 5.5)/(2 -3 x5) = -11.1654 iii. There are more than 1 input arithmetic expression in the file.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:00
Match each vocabulary word to its definition.1. desktoppicture used to represent acomputer application2. domainnetwork protectionsoftware code that can be viewed,3. iconmodified, and redistributed for freethe background screen on acomputer monitor4. url5. blogan online journalthe part of an internet address that6. firewallrefers to a group of computers on anetworkonline database of web pages7. intranetnetwork for use by an individual8. open address of a web page or9. wikiresource
Answers: 2
question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
You know the right answer?
1. Accept input from a) Standard input (loop for waiting next input after printing the computation r...
Questions
question
Mathematics, 03.08.2019 19:30
question
Mathematics, 03.08.2019 19:30
question
Mathematics, 03.08.2019 19:30