Go to Post Don't criticize them for what they have, learn from what they do. - xSAWxBLADEx [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 31-12-2009, 10:38
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Kind of off topic c programming question.

Quote:
Originally Posted by basicxman View Post
Plus when posting code on the forum please use [ CODE ][ /CODE ] (without spaces). Good luck!
or, even better, the [ PHP ] Tag (w/o spaces) Although meant for PHP, it (for the most part) correctly highlights C and C++ to some extent, and you can see an additional error: comments end with */ not *'

PHP Code:
#include "stdafx.h"


int _tmain(int argc_TCHARargv[])
{
int input_1/*Input from integer 1*/
input_2/*Input from integer 2*/
input_3/*Input from integer 3*/
high_value/* Highest Value */


/* Collect integers from the user. */

printf("Please enter your first number:");
scanf("%d", &input_1);
printf("Please enter your second number:");
scanf("%d", &input_2);
printf("Please enter your third number:");
scanf("%d", &input_3);

/* Find the largest number *'


if (input_1 >= input_2 && input_1 >= input_3) {
high_value = input_2;

}
else if (input_2 >= input_2 && input_2 >= input_3) {
high_value = input_2;
}

else if (input_3 >= input_1 && input_3 >= input_2) {
high_value = input_3;
}



/*Display the highest and lowest numbers*/
printf("\n\nThe Largest number is %d. \n",&high_value);




return 
0;

__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Off Topic Brett Elflord Chit-Chat 1 30-11-2007 18:05
OFF TOPIC: av switch matt111 Electrical 2 21-03-2004 15:34
Threads getting off topic Mike Soukup CD Forum Support 29 20-08-2001 04:08
chat/off-topic Brandon Martus General Forum 6 06-08-2001 10:10
off topic thread mike o'leary Chit-Chat 4 31-07-2001 22:55


All times are GMT -5. The time now is 07:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi