upd course
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int num;
|
||||
|
||||
printf("Please enter a number: \n");
|
||||
|
||||
scanf("%i", &num);
|
||||
|
||||
if (num < 0)
|
||||
{
|
||||
printf("-1");
|
||||
}
|
||||
else if (num > 0)
|
||||
{
|
||||
printf("1");
|
||||
}
|
||||
else if (num == 0)
|
||||
{
|
||||
printf("0");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Error");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user