Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is my coding and Im not sure what Im doing it wrong. Any help would be appreciate. Program Requirements The user might input numbers

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
This is my coding and Im not sure what Im doing it wrong. Any help would be appreciate.
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 comiments throughout your program. Comment your code! It is worth 10% of your grade! The first lines of all your files (h and cpp) must contain the following comments: i1enaze // last nane, first nane // ecst usernase Example Execution $./chart 14230 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. It is good programming practice to place the "100"in a single place so that it is easy to change: const int MAX -100 int values [MAXJ for (int . 0; i > values[i]: num -largest (values, MAX) // function call to find largest element print (values, MAX): // function to print for each number return 0 1-0 ; 1largest) largest values[il return largest; // return largest value //function to print int print (int values t], int size) ( for (int i ;i

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

Genomes Browsers And Databases Data Mining Tools For Integrated Genomic Databases

Authors: Peter Schattner

1st Edition

0521711320, 978-0521711326

More Books

Students also viewed these Databases questions