Simple C Help?

Discussion in 'Programming' started by Harmony, Feb 13, 2012.

  1. #1
    It says that `num' undeclared (first use this function)
     
    Solved! View solution.
    Harmony, Feb 13, 2012 IP
  2. #2
    #include <stdio.h>
    #include <conio.h>
    
    
    int main()
    {
    int num1;
    int num2;
    int num3;
    int num4;
    printf("Enter 4 numbers");
    scanf("%d%d%d%d", &num1, &num2, &num3, &num4);
    
    if(num1 + num2 == num3 + [COLOR="#FF0000"]num4[/COLOR]){
    printf("they are equal");
    }
    
    if(num1 + num2 != num3+ num4){
    printf("they are not equal");
    }
    
    getch();
    }
    Code (markup):
    Hey :)
    It was space problem like this: num 4
    :cool:
     
    ker, Feb 14, 2012 IP