Question: 1 a) Write a C++ programme that calculates the sum of a sequence of integers in the range 0 to 9, input by the user.

 1 a) Write a C++ programme that calculates the sum of

1 a) Write a C++ programme that calculates the sum of a sequence of integers in the range 0 to 9, input by the user. An example for typical inputs and expected output is given in the following table. Expected output Example input 1+2+3 1-2-3-4 6 -2 You can assume the following simplifications about the input to the programme: -All numbers in the sequence are integers from 0 to 9 (no double-digit numbers). --There are no spaces in the sequence. -The mathematical operators are only addition and subtraction. -No error handling is required (no unknown symbols or two symbols in a row). (Hint: The function isdigit() might be useful) 10 b) Draw a flow chart of an algorithm you propose for a C++ programme used to manage a library borrowing system. The programme will be used by the librarian to do the following tasks (no code is required); - Get a list of books borrowed by a student or a member of staff. - Find the location of a book in the library. - Search for a book with a given ISBN number. Total 35

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!