E
Equilibrium
what did I wrong with the program ? (use VC++)
/* Using if statment, relational operators,
and equality operators */
#include<stdio.h>
int main()
{
printf("Enter two integers, and I will tell you\n");
printf("the relationships they satisfy: ");
scanf("%d%d", &num1, &num2);
if (num1 == num2)
printf("%d is equal to %d\n", num1, num2);
if (num1 != num2)
printf("%d is not equal to %d\n", num1, num2);
if (num1 < num2)
printf("%d is less than %d\n", num1, num2);
if (num1 > num2)
printf("%d is greater than %d\n", num1, num2);
if (num1 <= num2)
printf("%d is less than or equal to %d\n", num1, num2);
if (num1 >= num2)
printf("%d is greater than or equal to %d\n", num1, num2);
return 0;
}
and there's build massage...
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1.cpp
D:\C & c++\1\1.cpp(9) : error C2065: 'num1' : undeclared identifier
D:\C & c++\1\1.cpp(9) : error C2065: 'num2' : undeclared identifier
Error executing cl.exe.
1.exe - 2 error(s), 0 warning(s)
/* Using if statment, relational operators,
and equality operators */
#include<stdio.h>
int main()
{
printf("Enter two integers, and I will tell you\n");
printf("the relationships they satisfy: ");
scanf("%d%d", &num1, &num2);
if (num1 == num2)
printf("%d is equal to %d\n", num1, num2);
if (num1 != num2)
printf("%d is not equal to %d\n", num1, num2);
if (num1 < num2)
printf("%d is less than %d\n", num1, num2);
if (num1 > num2)
printf("%d is greater than %d\n", num1, num2);
if (num1 <= num2)
printf("%d is less than or equal to %d\n", num1, num2);
if (num1 >= num2)
printf("%d is greater than or equal to %d\n", num1, num2);
return 0;
}
and there's build massage...
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1.cpp
D:\C & c++\1\1.cpp(9) : error C2065: 'num1' : undeclared identifier
D:\C & c++\1\1.cpp(9) : error C2065: 'num2' : undeclared identifier
Error executing cl.exe.
1.exe - 2 error(s), 0 warning(s)