Take 5 numbers from the user. Sum the first 4 numbers and subtract the last number from sum. Then, output both the answers (sum and subtraction). After output, take an average of all five numbers and output the average too. Then, check if average is greater than 7 then do a "postfix increment" in sum, otherwise do a "prefix decrement" in subtraction. Part-1: Draw the flowchart of the above written problem statement. Part-2: Write a C++ code according to the flowchart you have made in Part-1.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

Answer it as early as possible 

Problem Statement:
Take 5 numbers from the user. Sum the first 4 numbers and subtract the last number from
sum. Then, output both the answers (sum and subtraction). After output, take an average of all
five numbers and output the average too. Then, check if average is greater than 7 then do a
"postfix increment" in sum, otherwise do a "prefix decrement" in subtraction.
Part-1: Draw the flowchart of the above written problem statement.
Part-2: Write a C++ code according to the flowchart you have made in Part-1.
Note: Submit one pdf file only.
GOODLUCKO
Page 1 1
Transcribed Image Text:Problem Statement: Take 5 numbers from the user. Sum the first 4 numbers and subtract the last number from sum. Then, output both the answers (sum and subtraction). After output, take an average of all five numbers and output the average too. Then, check if average is greater than 7 then do a "postfix increment" in sum, otherwise do a "prefix decrement" in subtraction. Part-1: Draw the flowchart of the above written problem statement. Part-2: Write a C++ code according to the flowchart you have made in Part-1. Note: Submit one pdf file only. GOODLUCKO Page 1 1
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Encryption and decryption
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning