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
Write the definition of a function that takes as input three numbers. The function returns true if the floor of the product of t
SVETLANKA909090 [29]

Answer:

Written in C++

bool checkfloor(double num1, double num2, double num3) {

   if(floor(num1 * num2) == floor(num3)){

       return true;

   }

   else {

       return false;

   }

}

Explanation:

The function written in C++

This line defines the function

bool checkfloor(double num1, double num2, double num3) {

The following if condition checks if the floor of num1 * num2 equals num3

   if(floor(num1 * num2) == floor(num3)){

       return true; It returns true, if yes

   }

   else {

       return false; It returns false, if otherwise

   }

}

See attachment for full program including the main

Download cpp
4 0
3 years ago
Write a converter program for temperatures. This program should prompt the user for a temperature in Celsius. It should then con
Aleksandr [31]

Answer:

c = float(input("Enter the temperature in Celsius: "))

f = c * 1.8 + 32

print("The temperature in Fahrenheit: " + str(f))

k = (f - 32) / 1.8 + 273.15

print("The temperature in Kelvin: " + str(k))

Explanation:

*The code is in Python.

Ask the user to enter the temperature in Celsius

Convert the Celsius to Fahrenheit using the conversion formula and print it

Convert the Fahrenheit to Kelvin using the conversion formula and print it

3 0
3 years ago
1. cybersquatting refers to the tampering of existing web sites and selling unrelated products (true or false)
Dmitrij [34]

Answer:

i think its 17

Explanation:

i rerwerwerwrwerewr

5 0
3 years ago
In 5-10 sentences, describe the procedure for responding to an e-mail message.
miss Akunina [59]

Answer: See explanation

Explanation:

The procedure fur responding to an email message goes thus:

The first thing to do is to open the website of the email. Then, you would click on "compose".

When you click on compose, you'll see some space where you'll fill some information such as the email of the person that you're sending to, that is, the receiver. You'll also feel the subject of the email.

Then you type the content of your message. When you're done with this, then you click on send.

7 0
2 years ago
What need most led to the creation of the Advanced Research Projects Agency Network? DARPA wanted scientists to be able to colla
Bas_tet [7]

(A) DARPA wanted scientists to be able to collaborate and share research easily.

The initial purpose of ARPA was to enable mainly scientific users at the connected institutions to communicate and share resources, also to be able to link computers at Pentagon-funded research institutions over telephone lines, and it became the technical foundation of the Internet.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which is the quickest way to change the font color in multiple, randomly located cells in a worksheet
    8·2 answers
  • Can Someone give me a 5 paragraph essay about all of the uses in Microsoft Word.
    9·1 answer
  • Alison wants to add her company name at the bottom of every page in her document. Which option should she use?
    11·2 answers
  • What is the relationship between a method and a function
    11·2 answers
  • Which of the following are examples of how a company might use consumer data it had collected? a To decide what types of product
    10·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • Which of the following statements accurately describes linked data?
    5·1 answer
  • String[][] arr = {{"Hello,", "Hi,", "Hey,"}, {"it's", "it is", "it really is"}, {"nice", "great", "a pleasure"},
    11·1 answer
  • Which option should you choose to change the background of your current slide?
    10·2 answers
  • Name 3 things that you use daily that are considered computers?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!