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 these sedimentary rocks is made of the largest particles?
Marta_Voda [28]
Your answer is <span>A.conglomerate.

Hope this helps :)</span>
6 0
4 years ago
Why won't it let me submit my question
iVinArrow [24]

Answer:

what was the question?

Explanation:

8 0
3 years ago
What is a number system, and what is the total number of digits used in this system called?
DENIUS [597]
The number system is what is use globally as are way of counting the total number of digits is 9 because you can make any number with characters 1-9
7 0
3 years ago
Select the correct answer
DIA [1.3K]

Answer:

b

Explanation:

scan the images with 72DPI

5 0
3 years ago
Name a network device which would have to be
VMariaS [17]

Answer:

network interface card (NIC).

4 0
3 years ago
Other questions:
  • Speaker,printers, and monitors are all considered what?
    10·2 answers
  • Which describes the purpose of the continue statement in Java?
    5·1 answer
  • Now suppose that the file is broken into 5 packets, each of 10 Mbits. Ignore headers that may be added to these packets. Also ig
    14·1 answer
  • The degree to which a firewall can impose user access restrictions is known as which of the following?Security assurancePrivileg
    8·1 answer
  • A customer seeks to buy a new computer for a private use at home.The customer primarily needs the computer to use the Microsoft
    8·1 answer
  • 1. Define Validation Rule
    14·1 answer
  • 3.6 code practice (edhesive)
    8·1 answer
  • Which of the following tasks will save a file over top of itself, using the same filename? A. Reload B. Save C. Save As D. Expor
    13·1 answer
  • Cú pháp câu lệnh xóa thủ tục
    12·1 answer
  • A social media site violates its terms of service by selling information about its users
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!