Question: #include void count_down( void ) { // (a) Print the introductory message. // (b) Declare an integer variable that you will use to count. Initially
#include
void count_down( void ) {
// (a) Print the introductory message.
// (b) Declare an integer variable that you will use to count. Initially
// the counter should equal the start value, 346.
// (c) Begin a WHILE statement that will execute its loop body if the
// counter is greater than the end value, 74.
// (e) Print the value of the counter on a line by itself.
// (f) Subtract the step size, 3, from the counter.
// (d) End the WHILE statement
}
int main( void ) {
count_down();
return 0;
}
Complete the implementation of the count_down function. This function writes a descending list of integers to the standard output stream. The hash-tag for this exercise is #cab202CountDown. e function has no input variables and it does not return a result. se the standard C library function printf() to display a sequence of values, with each value printed by itself on a single line . The sequence should start at 346, and count backwards in steps of 3 until a lower bound of 74 is reached. . The lower bound, 74, should not be displayed, even if it would otherwise belong to the sequence . Before displaying the sequence of integers, the program should display a title line, containing the text Reverse order list of integers greater than 74, beginning at 346, stepping by 3. Notes: The first ev set of para ines of output produced by a program sim ilar to yours are shown below. Your results will not be exactly the same as this view, because each user gets a unique meters. However, it should give you an idea wh at to aim for /cygdrive/q/ $/oount down head Count down Erom 1105, by steps of 7, finishing before lower bound (123) is reached 1105 1098 1091 1084 1077 1070 1063 1056 1049 buckingleSEP-PC-071475 /cygdrive/q/AMS 2016/CAB202/ExerciseDevelopment/Topic02/Exercise02 $/count down tail1 188 181 174 167 160 153 146 139 132 125 bucking18SEP-PC-071475 /aygdrive/q/AMS 2016/CAB202/ExeraisaDevelopment/Topia02/Exercisa02 Things to do: The solution box below lists the steps required to complete this exercise, labelled (a) through (f. Complete the programming task by inserting one line of C code for eaclh labelled item (a).. (f) . Include the # include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
