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
I don't have a split screen in my Samsung Galaxy A02 why???​
weqwewe [10]

Answer:

YOU CAN open

Turn on Multi Window

1. Select the Recent apps key. 2. Select the desired app icon, then select Open in split screen view.

Explanation:

PLEASE MARK ME BRAINLIEST IF MY ANSWER IS CORRECT

6 0
2 years ago
Which of the following C++ statements displays a random number in the range 1 through 10?
lilavasa [31]

Answer:

Option(e)

Explanation:

rand() function results into a random number between 0 to a maximum number RAND_MAX which is a constant. To range it from 1, 1 is added and to decide its maximum value it should be modulo with that number. For example - if a number generated is 56 the 56%10 will be 6 which is in the range of 1 to 10. Option(a) is same as Option (b) because 1 is added and then subtracted which is neutral. Similarly, option (c) is also same.

7 0
3 years ago
Please help!!!!!!! 50 POINTS!!!!
mrs_skeptik [129]

Answer:

A,D,C,B are the correct answers

Explanation:

Hope this helps:)

3 0
3 years ago
When he takes a picture, Simon freezes an action without blurring it, to show movement. Which type of photographer is he?
Jlenok [28]

Answer:

freezing action photographer i think this is the type.... i don't know much about photography yet

Explanation:

6 0
3 years ago
Read 2 more answers
Find the greatest common factor of 48 and 36.​
gregori [183]

Answer:

Hello, The prime factorization of 48 is: 2 x 2 x 2 x 2 x 3. And The  prime factorization of 36 is: 2 x 2 x 3 x 3.

Explanation:

The prime factors and multiplicities 48 and 36 have in common are: 2 x 2 x 3.

2 x 2 x 3 is the "GCF" of 48 and 36.

"GCF"(48,36) = 12.

7 0
3 years ago
Other questions:
  • When a piston has three rings, the bottom ring will be?
    9·1 answer
  • People are able to predict future events to some extent because: (Select all that apply)
    11·1 answer
  • Is a tv a
    6·1 answer
  • Which statement describes Augmented Reality (AR) technology?
    12·1 answer
  • State what’s printed for each println in the code below:
    6·1 answer
  • I need help, thank you
    5·1 answer
  • What is 1 st genaration of computer ​
    14·2 answers
  • Does watching Beastars make me a furry? ​
    12·1 answer
  • What are the common internal components to most electronic devices?
    10·1 answer
  • Since data-flow diagrams concentrate on the movement of data between processes, these diagrams are often referred to as: A. flow
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!