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 pickaxe in minecraft to use?
Law Incorporation [45]

Answer:

Diamond pickaxe with efficiency 3

Explanation: It will mine quicker and you can just get unbreaking

6 0
3 years ago
To insert a new slide, which tab option should you select?
jek_recluse [69]

Ithink that the answer is C)

4 0
3 years ago
Read 2 more answers
Assume a TCP sender is continuously sending 1,090-byte segments. If a TCP receiver advertises a window size of 5,718 bytes, and
Arturiano [62]

Answer:

for the 5 segments, the utilization is 3.8%

Explanation:

Given the data in the question;

segment size = 1090 bytes

Receiver window size = 5,718 bytes

Link transmission rate or Bandwidth = 26 Mbps = 26 × 10⁶ bps

propagation delay = 22.1 ms

so,

Round trip time = 2 × propagation delay = 2 × 22.1 ms = 44.2 ms

we determine the total segments;

Total segments = Receiver window size / sender segment or segment size

we substitute

Total segments = 5718 bytes / 1090 bytes

Total segments = 5.24587 ≈ 5

Next is the throughput

Throughput = Segment / Round trip

Throughput = 1090 bytes / 44.2 ms

1byte = 8 bits and 1ms = 10⁻³ s

Throughput = ( 1090 × 8 )bits / ( 44.2 × 10⁻³ )s

Throughput = 8720 bits / ( 44.2 × 10⁻³ s )

Throughput = 197.285 × 10³ bps

Now Utilization will be;

Utilization = Throughput / Bandwidth

we substitute

Utilization = ( 197.285 × 10³ bps ) / ( 26 × 10⁶ bps )

Utilization = 0.0076

Utilization is percentage will be ( 0.0076 × 100)% = 0.76%

∴ Over all utilization for the 5 segments will be;

⇒ 5 × 0.76% = 3.8%

Therefore, for the 5 segments, the utilization is 3.8%

4 0
3 years ago
Question 11
STatiana [176]

What type of program would have a class named Student with objects called fullTime and partTime?

A. machine language program

B. object-oriented program

C. markup language program

D. procedural language program

Answer:

B. object-oriented program

Explanation:

An object-oriented program or OOP is a type of program that uses the concepts of objects and methods.

Although they are quite broad, they also make use of classes and types.

Java, for instance makes use of OOP as they use classes and objects under those classes and name them anyhow they want.

Therefore, the correct answer is B

8 0
3 years ago
Ping pc-b from a command prompt window on pc-a. were the pings successful? why?
love history [14]
If the pings are successful you are either on the same subnet and everything is configured correctly or ICMP echo is enabled on the router which it should be by default internally. Externally, ICMP can/should be disabled to avoid DOS attacks.
7 0
3 years ago
Other questions:
  • Please help
    14·1 answer
  • what aspect should you consider before adding pictures to a document? you should structure the first before you search for a rel
    15·2 answers
  • WILL DO A BRIANLY! Use an algorithm to help the Python Turtle get to the finish line in 10 steps by using only the 3 commands be
    12·1 answer
  • So can u please follow my new ig acc i just started it yesterday its called stunnerspamz
    5·2 answers
  • Three of the most important jobs of security management are to ensure _____ are organized according to sensitivity, ensure that
    10·1 answer
  • You are tasked with creating a mileage calculator to calculate the amount of money that should be paid to employees. The mileage
    5·1 answer
  • HIPAA requires the following controls for medical records: A. Encryption of all data B. Technical safeguards C. Physical control
    12·1 answer
  • Which of the following browsers was introduced with windows 10?
    10·1 answer
  • Which of the following variable names follows the rules for naming variables?
    13·1 answer
  • Compile and Execute a Program
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!