<?
#include <string>
#include <iostream>

using namespace std;

int main()
{
    
int celfar;
    
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;
}
?>
A program I wrote - TranceAddict Forums

TranceAddict Forums

TranceAddict Forums (www.tranceaddict.com/forums)
- Chill Out Room
-- A program I wrote
Pages (2): [1] 2 »


Posted by Sunsnail on Dec-29-2004 08:16:

Lightbulb 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


Posted by Sunsnail on Dec-29-2004 08:30:

Oh yeah, its supposed to say "please enter the amount of METERS you'd liek to convert..."


Posted by citric_acid on Dec-29-2004 08:33:

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



lol sweet, i can use that, yay! now make a ferenhiet 2 cecius, then id be all set


btw nice job, i tried learning c++ but im easily confused


Posted by sensorium on Dec-29-2004 08:37:

Good job. Now add an option so the user can exit the program.


Posted by Sunsnail on Dec-29-2004 09:26:

Sure, Im working on a farenheit 2 celsius now


Posted by citric_acid on Dec-29-2004 09:37:

quote:
Originally posted by Sunsnail
Sure, Im working on a farenheit 2 celsius now


yay!


Posted by Sunsnail on Dec-29-2004 09:37:

Here is the completed Farenheit to Celsius convertor. Enjoy

Clicky clicky


Posted by citric_acid on Dec-29-2004 09:47:

yay thanks! just dont type exit and hit enter lol



or atleast on my comp


Posted by Sunsnail on Dec-29-2004 09:48:

yeah, any non-numerical input makes it....weird, gonna try and fix that though

edit: im too noob to do that correctly, maybe later


Posted by Radagast on Dec-29-2004 09:49:

It's a virus that searches for all pictures on your hard drive and sends them directly to Sunsnail.


Posted by Sunsnail on Dec-29-2004 09:55:

quote:
Originally posted by Radagast
It's a virus that searches for all pictures on your hard drive and sends them directly to Sunsnail.


of course it isn't... who gave you that idea...


Posted by Tranceporter99 on Dec-29-2004 10:20:

quote:
Originally posted by Sunsnail
Sure, Im working on a farenheit 2 celsius now


i have the source code somewhere, ive already done it, its not too hard, same code pretty much, just diff math


Posted by sensorium on Dec-29-2004 10:42:

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!


Posted by sensorium on Dec-29-2004 11:13:

quote:
Originally posted by Nou

my compiler is all messed up and dying every other compile... but this works fine...


Good job sir.


Posted by itsTrueSonic on Dec-29-2004 15:52:

quote:
Originally posted by Nou
PHP:





umm.. i don't know about PHP, but are you supposed to include the "string" header to call "strcmp" ???


Posted by Eric Siefer on Dec-29-2004 16:59:

if you like C++, you'll love visual C++ or visual basic, alot neater to look at and user friendly.


Posted by 3xx3r7 on Dec-29-2004 18:00:

Java eats C++ for breakfast.


Posted by verndogs on Dec-29-2004 18:40:

quote:
Originally posted by 3xx3r7
Java eats C++ for breakfast.


C# owns all

but I love java


Posted by Ken_Allen on Dec-29-2004 19:09:

hmm...good work

I only know a little bit of javascript & html


Posted by digitalbreach on Dec-29-2004 20:06:

cout<<" I hate programming!!"; // my 2 cents


Posted by Tranceporter99 on Dec-29-2004 21:00:

quote:
Originally posted by verndogs
C# owns all


hell yeah, C++ is too many memory leaks, plus C# can handle web shit


Posted by DjSaline on Dec-29-2004 21:31:

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!


Posted by Quantized on Dec-29-2004 22:25:

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


Posted by Sunsnail on Dec-29-2004 23:35:

it wouldn't open


Posted by Quantized on Dec-29-2004 23:49:

quote:
Originally posted by Sunsnail
it wouldn't open


LOL it doesnt work on other computers? Oh well, i must really suck at programming


Pages (2): [1] 2 »

Powered by: vBulletin
Copyright © 2000-2021, Jelsoft Enterprises Ltd.