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
The logical view Select one: a. shows how data are organized and structured on the storage media. b. presents an entry screen to
Nana76 [90]

Answer:

The answer is "Option d'.

Explanation:

The database provides a single graphical view of the data, but it  provides the facility to use logical view concept, that uses by view command, that uses the dataset to provide a logical view, that shows data according to user condition, and certain options were incorrect which can be described as follows:

  • In option a, In logical viewing data, it is not used.
  • In option b, It doesn't represent entry screen it simply shows detail.
  • In option c, this command doesn't allow you to create duplicate data.
4 0
3 years ago
PLEASE HELP THIS IS CONFUSING ME
Artemon [7]

Answer:

The answer is:

Yes, because Antonio clearly copied someone else's words.

Explanation:

It is still forbidden to plagiarize Wikipedia despite it being a Open-Source Data base of information. This means, unless you directly cite in a bibliography or with in-text citations, the article, the author, and everything else needed in the proper citations for the format, it is plagiarism.

3 0
3 years ago
Read 2 more answers
Which of the following is the biggest issue facing wireless communication today?
anygoal [31]

Answer:

threats to privacy

Explanation:

7 0
3 years ago
Compared with a star topology, a hierarchical topology: a. is more effective at handling heavy but short bursts of traffic. b. a
Eduardwww [97]

Answer:

c. offers a great deal of network control and lower cost.

Explanation:

A network topology can be defined as a graphical representation of the various networking devices used to create and manage a network.

Compared with a star topology, a hierarchical topology offers a great deal of network control and lower cost.

4 0
3 years ago
Silvia fue a una revisión odontológica porque tiene problemas de salud en la dentadura y sus cepillos sólo duran dos semanas. Ah
Neko [114]

Answer: ella puede usar un cepillo de dientes eléctrico

8 0
3 years ago
Other questions:
  • true or false manual handling of materials accounts for the primary source of energy in the workplace
    13·2 answers
  • Can anybody come up with a catchy title for this?
    11·1 answer
  • PLEASE HELP!<br> How do you "brainliest" an answer?
    13·2 answers
  • This diagram shows a number of computing devices connected to the Internet with each line representing a direct connection.
    11·1 answer
  • ICS facilitates the ability to communicate by using:
    7·1 answer
  • To whom the script most important
    13·1 answer
  • A garments manufacturing company buys various types of natural and synthetic materials to produce clothes. Which material is a s
    6·2 answers
  • True or False The two types of general construction projects are residential for homes or dwellings and commercial for a commerc
    7·1 answer
  • What is ABC computer?​
    14·1 answer
  • RAM memory is intended?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!