#include int main() { int x = 10; static int y = x; if(x == y) printf("equal"); else if(x > y) printf("greater"); else printf("less"); getchar(); return 0; }
Answers
Answered by
0
Answer:
There is mistake in program let me correct it first after that I will explain it
it will print equal
but if below I have written is not you program then you have list of error
- hadder file is missing
- direct assigning value is not allow (static int y= x)
- compiling error
Below my program Output is Equal I hope that my answer will help you out
Explanation:
#include<stdio.h>
#include<conio.h>
int main()
{
int x =10;
static int y;
y=x;
if (x==y)
{
printf("equal");
}
else if (x>y)
{
printf("greater");
}
else
{
printf("less");
}
getch();
return 0;
}
Similar questions