Question: Please do this in c++ Objectives - Practice input and output. - Practice using arrays - Practice implementing ioops - Practice implementing functions Notes: You
Objectives - Practice input and output. - Practice using arrays - Practice implementing ioops - Practice implementing functions Notes: You must complete Lab 1 before starting Project 1. This is an individual assignment. Do not share code or look at anyone else's code. You may share ideas with others, but not code. If you share code or collaborate too closely with others, your code is very likely to be flagged by our anti-plagiarism checker and you may not receive any credit for your submissions. If there are multiple instances of your submissions getting flagged, I have to fail you in the course. Please use common sense and avoid this common pitfall. Overview You will write a program named chart to read a sequence of integers from 'standard input", and output a "bar chart" to "standard output", using asterisk and space characters (") and " 7 . The input specifies a sequence of up to 100 integerzgreater than 0 . The last value in the input must be a 0 , indicating that the input is complete. For example, if the input contains the sequence 123432160 then your program must write the following output to "standard out": Note: Space characters are used to output the whitespace in the chart above. There are 8 integers in the input fignoring the 0), so there are 8 vertical "bars" in the bar chart. The height of each veritcal "bar" in the chart above is controlled by each of the integers. The frst "bar" is one asterisk tal because the first integer in the input is a 1 . The last. "bar" is six asterisks tall because the last integer in the input (ignoring the 0 ) is 6 . Note 1; The only characters output on each line are space ( 7 and asterisk f2. Note 2. You must output the lines of the bar chart in from top to bottom this is the only way you can write to "standard cutput? Each wine is output from left to right. The input might have numbers on separate lines, or on the same line separated by "white space". The best way to handle input like this is to use the buit-in C++>>"extraction operator", which reads input delimeted by "white space". In computer input, "white space" means spaces, tabs and "end of line" characters. This type of input is also known as "token based" input. .. continued on next page
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
