Home | Community | Message Board


This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Myyco.com Shop: Golden Teacher Liquid Culture For Sale

Jump to first unread post Pages: 1
Need help with a simple if/else problem in c++, anyone out there?
    #19607164 -

I thought I had a reasonably okay grasp on this class for the first few weeks, but I don't know what the heck is wrong here.

/*** PREPROCESSOR INSTRUCTIONS  **********/
#include <stdio.h>;

/*** MAIN CONTROL MODULE  **********/
int main()
{
double FirstNum;  //First number from user
double SecondNum;  //Second number from user

printf("\nEnter a number: ");
fflush(stdin);
scanf("\n%d", &FirstNum);

printf("\nEnter another number: ");
fflush(stdin);
scanf("\n%lf", SecondNum);

if (FirstNum == SecondNum)
{
printf("\nThe numbers are the same.");
}

fflush(stdin);
getchar();
return 0;

if (FirstNum < SecondNum)
{
printf("%lf is larger than %lf ", FirstNum, SecondNum);
}
else
{
printf("%lf is larger than %lf ", SecondNum, FirstNum);
}


fflush(stdin);
getchar();

return 0;
}



/* END OF FILE */

Extras: Filter Print Post Top
Re: Need help with a simple if/else problem in c++, anyone out there? [Re: OnePerEyeM8]
    #19607226 -

Got it. Pretty sure I've had it right multiple times but I was compiling an old version rather than the one I was messing around with or something. Two hours of my life != worth it.

Extras: Filter Print Post Top
Jump to top Pages: 1

Myyco.com Shop: Golden Teacher Liquid Culture For Sale


Similar ThreadsPosterViewsRepliesLast post
* Simple C Program Help Needed Che_Night_Soil 631 1 01/30/04 07:03 PM
by Che_Night_Soil
* Huston, we have a problem. AnnoA 1,299 11 04/20/03 11:20 AM
by Seuss
* modem problems dog 1,288 9 10/03/03 09:54 PM
by dog
* Read this! Massive SECURITY problem with Win XP! Fd3000 1,403 14 10/24/02 05:57 PM
by
* computer problems thePatient 1,481 8 03/26/04 04:14 AM
by Seuss
* Why do I keep having this problem? User Exists 2,000 12 08/22/03 11:08 AM
by User Exists
* sound problem in linux Anonymous 1,011 12 07/14/04 10:10 PM
by monoamine
* computer problems blacksabbathrulz 1,455 11 02/06/04 02:17 AM
by Xochitl

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: trendal, automan, Northerner
293 topic views. 0 members, 27 guests and 1 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2026 Mind Media. Some rights reserved.

Generated in 0.024 seconds spending 0.006 seconds on 14 queries.