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
What does modulate your voice mean
alexandr1967 [171]
To modulate your voice is to modify or gain more control of your voice. It basically means to change or adjust the pitch or tone.
7 0
3 years ago
Read 2 more answers
The concept of a process in an operating system embodies two primary characteristics, one of which is:
miv72 [106K]

Answer:

Resource Ownership and Scheduling execution

Explanation:

In process characteristic the characteristic is

  • Resource ownership
  • Scheduling / Execution

In Resource ownership, the OS performs a protection function where unwanted interference in processes are with resources

In scheduling execution, the process has execution state and scheduled. They can be separated by resource ownership.

The dispatching of the process is the lightweight process, and it is multi-threading. The ability of the operating system supports the single concurrent process.

The process is a unit in the resource protection and protected the CPU and other processes. It contains the multiple thread execution

Each thread contains the running, ready state and saved the thread context and access the memory. Some necessary activities of the various threads are the same address space and the resources.

7 0
4 years ago
List at least three things that are included as part of property rights.
KatRina [158]
1) exclusivity of rights to choose the use of the resource

2) exclusivity of rights to the severices of a resource

3) rights to exchange at mutually agreeable terms
4 0
3 years ago
Each vertex in a graph of n bertices can be the origin of at most ____edges
EastWind [94]

Answer:

B. n-1

Explanation:

If there are n vertices then that vertex can be origin of at most  n-1 edges.Suppose that you have a graph with 8 vertices you can select a vertex from these 8 vertices now you have 7 other vertices.So the vertex you selected can have at most 7 edges or it can be origin of at most 7 edges.So we conclude that the answer is n-1.

6 0
3 years ago
Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of th
lana [24]

quetma es elpx mjeghgieo

4 0
3 years ago
Other questions:
  • Sleeping is an effect of _______ , but agitation may cause a person to wake up
    7·2 answers
  • Which extensions can help drive installs of your mobile app?
    12·1 answer
  • Anna’s computer will not power on. What aspect of the computer should Anna check (hardware or software)? How can Anna work to re
    5·1 answer
  • How should font appear in a slide presentation compared to the font in a document
    7·1 answer
  • Select a cybersecurity career that interests you. Describe the job duties and identify the skills required to excel in that care
    15·1 answer
  • A golf ball is at rest on the grass. What must happen to cause the ball to move?
    5·1 answer
  • A _____ refers to a product or service, such as a technical report, a training session, a piece of hardware, or a segment of sof
    12·2 answers
  • The Clean Air Act Amendments of 1990 prohibit service-related releases of all ____________. A) GasB) OzoneC) MercuryD) Refrigera
    15·1 answer
  • I'm making a game. I'm trying to make it so that instead of how I currently have it, starting whenever I click the screen, it st
    6·1 answer
  • Difine the term pigment​
    14·3 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!