# Need help with Celsius to fahrenheit program

Page 1 of 1

## 3 Replies - 1487 Views - Last Post: 29 January 2009 - 07:01 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=83577&amp;s=04911d069d14e37e30ee9c7e8e0d0271&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 southerngenes

Reputation: 0
• Posts: 27
• Joined: 29-January 09

# Need help with Celsius to fahrenheit program

Posted 29 January 2009 - 06:36 PM

I'm not sure what I am missing here. I need it to display Celsius 0-20 and list the Fahrenheit equivalents.

Here's what I have so far:

#include "stdafx.h"
#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
double c, f;

cout << fixed << showpoint << setprecision(1);

cout << "Celsius Fahrenheit\n";
cout << "------------------\n";

for (c=0; c >= 20; c++)
{
f = 1.8 * c + 32;

cout << c << "\t" << f << endl;
}
return 0;
}

Is This A Good Question/Topic? 0

## Replies To: Need help with Celsius to fahrenheit program

### #2 Gloin

• Expert Schmexpert...

Reputation: 235
• Posts: 4,489
• Joined: 04-August 08

## Re: Need help with Celsius to fahrenheit program

Posted 29 January 2009 - 06:45 PM

for (c=0; c >= 20; c++)

### #3 southerngenes

Reputation: 0
• Posts: 27
• Joined: 29-January 09

## Re: Need help with Celsius to fahrenheit program

Posted 29 January 2009 - 06:54 PM

Oops! Glad its now working! Thanks!

### #4 Gloin

• Expert Schmexpert...

Reputation: 235
• Posts: 4,489
• Joined: 04-August 08

## Re: Need help with Celsius to fahrenheit program

Posted 29 January 2009 - 07:01 PM

You're welcome!