<?
#include <string>
#include <iostream>
using namespace std;
int main()
{
int cel, far;
char *test;
test = 'q';
while (!strcmp(test,"y"))
{
cout << "Please enter the temperature in degrees celcius: ";
cin >> cel;
far = cel*9/5+32;
cout << "The temperature " << cel << " in fahrenheit is " << far << ".\n";
cout << "Exit? (enter y to exit, any other character to continue): ";
cin >> test;
} //end while
return 0;
}
?>
TranceAddict Forums (www.tranceaddict.com/forums)
- Chill Out Room
-- A program I wrote
Pages (2): [1] 2 »
A program I wrote
I'm just getting into C++ program, and it's really fun! (and hard to comprehend.) Here's a little program I wrote:
Clicky
no its not a virus 
Oh yeah, its supposed to say "please enter the amount of METERS you'd liek to convert..."
Re: A program I wrote
| quote: |
| Originally posted by Sunsnail I'm just getting into C++ program, and it's really fun! (and hard to comprehend.) Here's a little program I wrote: Clicky no its not a virus |
yay! now make a ferenhiet 2 cecius, then id be all set 
Good job. Now add an option so the user can exit the program. 
Sure, Im working on a farenheit 2 celsius now
| quote: |
| Originally posted by Sunsnail Sure, Im working on a farenheit 2 celsius now |
Here is the completed Farenheit to Celsius convertor. Enjoy
Clicky clicky
yay thanks! just dont type exit and hit enter lol
or atleast on my comp
yeah, any non-numerical input makes it....weird, gonna try and fix that though
edit: im too noob to do that correctly, maybe later 
It's a virus that searches for all pictures on your hard drive and sends them directly to Sunsnail.
| quote: |
| Originally posted by Radagast It's a virus that searches for all pictures on your hard drive and sends them directly to Sunsnail. |
who gave you that idea...
| quote: |
| Originally posted by Sunsnail Sure, Im working on a farenheit 2 celsius now |
I have all the source codes for these porgrams. Can't find the floppies!
If user inputs something, example is N, to a quesion like: "Do you wish to continue? Y/N:" The program should end. I think you can do this with a "while" or "if" loop. Damn floppies!
| quote: |
| Originally posted by Nou my compiler is all messed up and dying every other compile... but this works fine... |
| quote: |
Originally posted by Nou |
if you like C++, you'll love visual C++ or visual basic, alot neater to look at and user friendly.
Java eats C++ for breakfast. 
| quote: |
| Originally posted by 3xx3r7 Java eats C++ for breakfast. |
hmm...good work
I only know a little bit of javascript & html 
cout<<" I hate programming!!"; // my 2 cents
| quote: |
| Originally posted by verndogs C# owns all |
I felt so awesome the first time i created a program. just don't get frustrated when you start breaking the 20-line instruction mark and see errors. always use comments, ALWAYS. Every time i jump ship to another software project, we alike to introduce ourselves by stories of 500-line programs with errors due to typos and logical errors. UGH!
I have to learn c++ as part of my major at uni, and i really fookin hate programming
Anyway, this is as far as ive got with it:
Awesome Program
it wouldn't open 
| quote: |
| Originally posted by Sunsnail it wouldn't open |
Powered by: vBulletin
Copyright © 2000-2021, Jelsoft Enterprises Ltd.