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
Where are parameters such boot order, processor voltage, motherboard raid, hardware virtualization support, and overclocking con
ololo11 [35]

This is configured on the BIOS Setup. During computer start-up usually for windows system this can be accessed via pressing on ESC or Function keys on immediate start up.

6 0
3 years ago
Public places where you can wirelessly connect to the internet are known as wifi ________.
AleksAgata [21]

<span>Answer - Hotspots</span>

<span>
</span>

<span>Public places where you can wirelessly connect to the internet are known as Wi-Fi hotspots. Common Wi-Fi hotspot locations (where wireless internet connection is offered) include such places as cafes, hotels, airports, and libraries. These businesses usually create hotspots for the use of their customers.</span>

8 0
3 years ago
The following program is run. Then the user clicks the "bottomButton" TWO TIMES. What will be displayed in the console?
IrinaK [193]

Answer:

A. aaa

bbb

ccc

ccc

ddd

B. bbb

ddd

ccc

ccc

C. bbb

ddd

aaa

aaa

D. bbb

ccc

ccc

ddd

8 0
3 years ago
Read 2 more answers
Angelina wants to modify the footer in her report so the page numbers are correct. To do this, she first double-clicks the foote
Mkey [24]

Answer:

Click Page Number, Click Current Position, Click Plain Number 1.

Explanation:

Just did it, e2020

4 0
3 years ago
OH NO THE HEAVY IS DEAD
Anarel [89]

Answer:

what does that mean?

are you okay?

Did something happen?

4 0
3 years ago
Read 2 more answers
Other questions:
  • ) The ________ displays a text box and button for users to browse, select, and upload a file. (Points : 3)
    13·1 answer
  • Observe the things at Home in which you are using binary
    7·1 answer
  • Word processing, presentation, photo editing, and video games are all types of what?
    9·2 answers
  • Universal Containers has a sales team focused on renewals. They will use many of the same Opportunity fields as other teams, but
    13·1 answer
  • A strategic information system can be any kind of information system that uses information technology to help an organization __
    11·1 answer
  • Which of the following types of computers is typically used by governments and hospitals and can support hundreds of users?
    6·2 answers
  • create a function that has an argument is the triple jump distance. It returns the estimate of vertical jump height. The world r
    8·1 answer
  • A company is deploying NAFDs in its office to improve employee productivity when dealing with paperwork. Which of the following
    11·1 answer
  • Write two statements that each use malloc to allocate an int location for each pointer. Sample output for given program:
    7·1 answer
  • ACTIVITY NO. 5 (DAY 5) FACT OR BLUFF. Write Fact if the statement is correct and write Bluff if it is incorrect.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!