Quote:
Originally Posted by basicxman
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, _TCHAR* argv[])
{
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;
}