1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kiruha [24]
2 years ago
13

Write a program that takes in an integer in the range 10 to 100 as input. Your program should countdown from that number to 0, p

rinting the count each of each iteration. After ten numbers have been printed to the screen, you should start a newline. The program should stop looping at 0 and not output that value.
I would suggest using a counter to count how many items have been printed out and then after 10 items, print a new line character and then reset the counter.

important: Your output should use " %3d " for exact spacing and a space before and after each number that is output with newlines in order to test correctly.

Ex: If the input is: 10
the output is: 10 9 8 7 6 5 4 3 2 1

Ex: If the input is: 20
the output is: 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

For coding simplicity, follow each output number by a space, even the last one. statement.

Use a while loop. You will need to use an if statement and some sort of decremented variable in your loop.

The skeleton code given in C programming:

#include

int main(void) {
int userNum = 0;
int counter = 0;
printf("Enter a number between 10 and 100:\n");
scanf("%d", &userNum);
if (userNum >= 10 && userNum <=100)
{
while( )
{
/* your code here */
}
}
printf("\n");

return 0;
Computers and Technology
1 answer:
kumpel [21]2 years ago
7 0

Answer:

Program to perform above

Explanation:

#include <stdio.h>

int main() {

   int userNum = 0;

   int counter = 0;

   printf("Enter a number between 10 and 100:\n");

   scanf("%d", &userNum);

   if (userNum >= 10 && userNum <=100)

       {

       while(userNum > 0)

           {

               printf("%d\n", userNum);

               userNum--;

               

           }

       } else

       {

           printf("Number is out of range");

       }

printf("\n");

   

   return 0;

}

You might be interested in
Sami needs to decide how the fonts, colors, and images will look on her new web site. Which will help her pian her design?
shtirl [24]
Maybe a sketchbook:))))
6 0
2 years ago
What best describes "broadband access"?
Andre45 [30]

Answer:

The Correct option is : d. BROADBAND ACCESS enable users to connect to a high speed networks

Explanation:

As the names implies BROADBAND ACCESS can be defined as a technology that enables users to have the access to fast and high speed internet connection when browsing, streaming or downloading reason been that BROADBAND ACCESS is more faster and quicker which inturn enables the user to do a lot more on the internet which is why BROADBAND ACCESS is often refer or known as a high and fast speed Internet access connection.

5 0
3 years ago
5 of 10
DaniilM [7]

Answer:

what

Explanation:

3 0
2 years ago
Observe the things at Home in which you are using binary
vazorg [7]

Explanation:

All five things i can come up with her

1. Doors (we either open or close them)

2. Tap (we either open or close the valve)

3.  Electric stove/cooker

4. The lid of containers

5. Shoes/ foot wears(we put them ON or OFF)

7 0
3 years ago
How to boost audio live ​
Masteriza [31]
Huh


Hzhanajsjjajajans
6 0
3 years ago
Other questions:
  • Create a view named ItemOrder view. It consists of the TaskID, description, price, order number, order date, and quoted price fo
    8·1 answer
  • ​_____ was the first commercially successful computer. ​z3 ​eniac ​univac ​colossus
    13·1 answer
  • WILL GIVE BRAINLIEST!!
    12·1 answer
  • You are part of a team that is setting up a movie streaming service. The company is planning on initially making available 500 m
    8·1 answer
  • You’re driving down the highway when one of your tires suddenly blows out.<br> you should
    10·2 answers
  • What are two names for the database that holds digital signatures provided by os manufacturers, such as microsoft and red hat?
    6·1 answer
  • If all the data in a database is not physically located in one place, it would be a(n _______ database.
    5·1 answer
  • For each part create a vector n in which the first element is 1, the increment is 1 and the last term is 5, 50, or 5,000. Then u
    13·1 answer
  • Claire writes a letter to her grandmother, in which she describes an amusement park she visited last week. She adds pictures of
    13·1 answer
  • A. Suppose a CPU with a write-through, write-allocate cache achieves a CPI of 2. What are the read and write bandwidths (measure
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!