Fund of programming 1

posted by .

Complete the following C++ program. The program should compute and output the Celsius value corresponding to the given Fahrenheit value.
// Celsius program
// This program outputs the Celsius temperature
// corresponding to a given Fahrenheit temperature
#include <iostream>
using namespace std;
int main()
const float fahrenheit = 72.0;

  • Fund of programming 1 -

    float celcius = (5.0/9.0)*(fahrenheit-32)

    then just output the values needed

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Algebra

    Celsius temperature readings can be converted to Fahrenheit readings using formula F=9/5c+32 What is the fahrenheit temp. that corresponds to each of the following Celsius temperatures -10, 0, 15, 1000?
  2. C Programming

    Write a program that prompts the user to enter a temperature, followed by a letter representing Celsius (C) or Fahrenheit (F). Then prompt the user for the conversion type and print the results to the screen with one decimal point. …
  3. C Programming

    This is what the program needs to do: Enter a temperature: 32.4 Enter 'C' for Celsius or 'F' for Fahrenheit: C Choose a conversion ('C' for Celsius or 'F' for Fahrenheit): F The temperature is: 90.3 F. How would I store the input when …
  4. C Programming

    Okay, question. What if I inputted this: Enter a temperature: 32 Enter 'C' for Celsius or 'F' for Fahrenheit: c Choose a conversion ('C' for Celsius or 'F' for Fahrenheit): c The temperature is: 0.0 C. I want the program to read [The …
  5. computer science

    in one the chapter 3 programming challenges you were asked to write a program that converts a celsius temperature to fahrenheit. Modify that program so it uses a loop to display a table of celsius from 0 to 20 and their Fahrenheit …
  6. writting a program

    Speed of Sound. Sound travels through air as a result of collisions between the molecules in the air. The temperature of the air affects the speed of the molecules, which in turn affects the speed of sound. The velocity of sound in …
  7. Programming

    Write a program that would calculate and display the results for the multiplication table for values ranging from 1 to 100. Your program should print the output for each step and output a new line after 10 items. Provide your program …

    Celsius to Fahrenheit Table Design a program that displays a table of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. The formula for converting a temperature from Celsius to Fahrenheit is F = 95 C + 3 2 where …
  9. programming

    A store uses the following policy to award discount. If the customer purchases products costing more than ksh 30,000 she is given a discount of 10%, otherwise she is given a discount of 2%. Write a complete C++ program that allows …
  10. C++

    // Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert temperature …

More Similar Questions