c Programming Exe1 1
c Programming Exe1 1
Exercise 1 Exercise 2
#include <stdio.h> #include <stdio.h>
int main()
{ int main()
int x; {
printf("Please enter a number:"); int x;
scanf ("%d",&x); printf("Please enter a number:");
if(x > 0){ scanf ("%d",&x);
printf("\nThe number %d is greater than 0",x); if(x > 0)
} {
return 0; printf("\nThe number %d is greater than 0",x);
} }
else
{
printf("\nThe number %d is less than or equal zero",x);
}
return 0;
}