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
Y_Kistochka [10]
3 years ago
7

Write a program that reads in a temperature value in °F. Create a function ConvertFahrenheit that takes that value as a paramete

r and prints out the equivalent values in °C and K. Note: Only the conversion and printing is done inside the function. Reading user input happens in main().
Computers and Technology
1 answer:
larisa86 [58]3 years ago
8 0

Answer:

#include<stdio.h>

void ConvertFahrenheit(float);

void main()

{

float fahrenheit_temp;

printf("Input the temperature in Fahrenheit: ");

 

scanf("%f", &fahrenheit_temp);

 

ConvertFahrenheit(fahrenheit_temp);

}

void ConvertFahrenheit(float fahren) {

float c, k;

 

c = (fahren - 32)/1.8;

k = (fahren + 459.67)/1.8;    

 

printf("Celsius = %f\n", c);

printf("Kelvin = %f", k);

}

Explanation:

  • Inside the main function, take the temperature in Fahrenheit as an input from user and call the ConvertFahrenheit function by passing it the  fahrenheit_temp variable as an argument.
  • Create the ConvertFahrenheit function for the conversion  and convert the fahrenheit value to the Celsius and Kelvin by using their conversion formulas respectively.
  • Lastly, display the result in Celsius and Kelvin.
You might be interested in
Which item can be added to Outlook messages, like a Word document or PowerPoint presentation, that takes standard bulleted lists
Sonja [21]

Answer:

WordArt

Explanation:

Took exam

4 0
2 years ago
3. Megan and her brother Marco have a side business where they shop at flea markets, garage sales, and estate
Neko [114]

Answer:

a

Explanation:

Megan doesn't have a registered business. She can't claim insurance

4 0
3 years ago
CHALLENGE ACTIVITY 4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a n
tino4ka555 [31]

Answer:

#include<iostream>

using namespace std;

int main()

{

int userNum;

userNum=9;

while(userNum>=0)

{

  cout<<"Body"<<endl;

  cin>>userNum;

}

cout<<"Done"<<endl;

return 0;

}

Explanation:

  • Use the userNum >= 0 expression that executes the loop while the user enters a number greater than or equal to 0.
  • Print the userNum inside the while loop.
3 0
3 years ago
How many currencies do recognize?
klemol [59]
The United Nations currently recognizes 180 currencies that are used in 195 countries across the world the United States dollar is a popular currency and about 66 countries either peg their currency to the US dollar or use it as their currency
3 0
3 years ago
To change the backround color of a page, which tab would you use?
ivann1987 [24]
I have concluded the answer is a
4 0
3 years ago
Read 2 more answers
Other questions:
  • Format Painter cannot be used to copy only character attributes. True or False
    12·1 answer
  • What type of malware is heavily dependent on a user in order to spread?
    11·1 answer
  • I want to customize my company's logo, name, address, and similar details in all my business documents what option should use?
    12·1 answer
  • You can leave out the ____ statements in a switch structure.
    15·1 answer
  • Select the statements that are true regarding the future of technology. Select 2 options.
    12·1 answer
  • Which database item would show details such as a customer’s name, their last purchase, and other details about a customer?
    11·2 answers
  • Which type of microscope can only be used to view non-living specimens?
    10·2 answers
  • Implement function bin2dec that takes a binary number bin_num as a string argument and prints out the corresponding decimal numb
    9·1 answer
  • What is the forging of the return address on an email so that the email message appears to come from someone other than the actu
    11·1 answer
  • Please Help! <br> I need good Anime to watch!
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!