Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Requirements The user might input numbers on separate lines. If you read them using cin >you don't have to think about lines, spaces, tabs.

image text in transcribed
image text in transcribed
image text in transcribed
Program Requirements The user might input numbers on separate lines. If you read them using cin >you don't have to think about lines, spaces, tabs. Your program should read up to 100 positive integers (greater than 0) from standard input. You must store these integers in a single array. Do not use a vector. PROTIP: Did you remember to handle negative numbers? You must use functions to compartmentalize subtasks. Your main function should be the driver that calls these functions. For example, there are three subtasks in this program. PROTIP: Your functions should appear after your main function. Do not forget to list the function prototypes near the top of your program. Formatting and Style Your program must be neatly organized and consistently indented. You must have informa- tive comments throughout your program. Comment your code! It is worth 10% of your grade! The first lines of all your files (h and cpp) must coitain the following comments: last ase, first nase ecst.userae Example Execution $./chart 1 4 23 At the unix prompt $ the user typed chart, the program's executable, and hits enter. Then the user inputed five integers separated by spaces. Since the last integer was a zero, the program prints out the asterisks and spaces to form the chart. PROTIP: Make sure you output what is expected, nothing more and nothing less. Tips & Tricks Use Constants Since you will not be given more than 100 integers, create an array of 100 integers. Iti good programming practice to place the "100" in a single place so that it is easy to change: const int MAX 100; int values [NAX]; for int i 0;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Entity Alignment Concepts Recent Advances And Novel Approaches

Authors: Xiang Zhao ,Weixin Zeng ,Jiuyang Tang

1st Edition

9819942527, 978-9819942527

More Books

Students also viewed these Databases questions

Question

1. How might volunteering help the employer and the employee?

Answered: 1 week ago