Question: In C + + Write all your code for the following steps in one file as one program. This program doesnt really do anything except
In C Write all your code for the following steps in one file as one program. This program doesnt really do anything except illustrates various ways to use a while loop. Each of the items below are independent of each other they are not steps to accomplishing one program Ask the user to enter a single string. Ask the user to enter an integer value for a variable calledrepetitions Use a while loop to display thisstring of your choice repeated repetitions times, one string per line.Hint: declare an integer called counter, initialized to zero Use a while loop to count and display all the integersfrom to Separate numbers with a space Ask the user to enter a number larger than Then, use a while loop to display all numbers divisible by starting from the number entered by the user all the way down to Only show numbers divisible by Separate numbers with a tab. TAB character is displayed using the t escape sequence. Remember that
is a newline; use similarly Use a while loop to keep asking the user for an integer as long as positive numbers are being entered. For every positive number entered, show its value multiplied by Once a negative number is entered stop asking and quit the loop Use a while loop to keep asking for a string until a particular string is entered for example, byeHint: declare at least two string variables.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
