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
Grace [21]
3 years ago
6

Write a program that prompts the user to enter a four-digit integer and displays the number in reverse order. Here is a sample r

un:
Enter an integer: 5213

3

1

2

5
Computers and Technology
1 answer:
iVinArrow [24]3 years ago
7 0

Following are the code that is written in c language

#include <stdio.h>

int main() // main function

{

int n1,t; // declaring variable

printf(" Enter an integer :");

scanf("%d",&n1); // taking input

while(n1>0) // iterating over the loop untill the value of n is greater then 0

 {

t=n1%10;

printf("%d",t);

printf("\n");

n1=n1/10;

}

return 0;

}

Explanation:

we taking an integer value n1 and iterating over the loop untill n1>0

suppose n1=1234

then  t=n%10;

means t=1234%10

as % holds reminder means t=4

then print the value of t means print 4

and n1 becomes 123 which is > 0  again condition is checking and same process is follow untill n1>0

output

Enter an integer: 5213

3

1

2

5

You might be interested in
Which of the following statements best deceive the relationship between carrying capacity and population size
Andrej [43]

Hey lad, your questions options should be:

a. Carrying capacity increases population size.

b. Carrying capacity determines maximum populations size.

c. Population size is not affected by carrying capacity.

d. Population size increases the carrying capacity.

And B: Carrying capacity determines maximum populations size should be the right answer.

hope you get a victory royale with cheese on your assignment


4 0
4 years ago
What are the missing whole numbers on this number line? Enter your answers in the boxes. plz show work I'm I need answer 3rd gra
adell [148]
1 3 and 4... you are just counting up from 0
5 0
3 years ago
Java: which expression is evaluated first
nignag [31]

Answer:c ll d  

Explanation:

cus they are inside ()--parantheses

5 0
3 years ago
When you take a multiple-choice test, you are relying on ________, a means of retrieving information out of your long-term memor
miv72 [106K]

Answer:

recognition

Explanation:

<h2><u>Fill in the blanks</u></h2>

When you take a multiple-choice test, you are relying on <u>recognition</u> , a means of retrieving information out of your long-term memory storage system that helps you choose the correct answer.

4 0
3 years ago
How to make a message appear in more than one slack channel
VMariaS [17]

Answer:

On your desktop, hover over the message you'd like to share and click the Share message icon on the right. Use the drop-down menu to choose where you'd like to share the message, and add a note if you'd like. Click Share to see the message expand.

Explanation:

7 0
3 years ago
Other questions:
  • Discuss what they need to consider if they wish to use their devices when they are away from home?
    6·1 answer
  • Does time complexity depend on, which base arithmetic you use? like base 10, 2 or whatever else? Does time coplexity depned on t
    13·1 answer
  • All of the nested folders you created will carry the same permissions as the __________ until you make changes.
    10·1 answer
  • What is an example of how pseudo - randomness is used to creative variation​
    5·1 answer
  • Alright, don't judge me, this is a question that involves my Childhood game PvZ GW 2. So I noticed mods and stuff that get uploa
    12·2 answers
  • A cashier distributes change using the maximum number of five dollar bills, followed by one dollar bills. For example, 19 yields
    15·2 answers
  • A method that determines if a list is empty in a consistently written linked list class that uses a reference first to point to
    13·2 answers
  • An article explaining the uses of the parts of a computer​
    14·1 answer
  • ________ are the symbolic codes used in assembly language?​
    6·1 answer
  • Dynamics simulate stillness via calculations performed by the computer.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!