What's wrong with this code? (I'm trying for the program to print the highest number)
Code:
#include <stdio.h>
int main()
{
int num,num2,num3;
printf("Please enter the first number: ");
scanf("%d", &num);
printf("Please enter the second number: ");
scanf("%d", &num2);
printf("Please enter the third number: ");
scanf("%d", &num3);
if (num > num2 && num > num3)
printf("The highest number is: %dn", num);
if (num2 > num && num2 >num3)
printf("The highest number is %dn", num2);
if (num3 > num && num3 > num 2)
printf("The highest number is %dn", num3);
system("PAUSE");
}