Skip to content

Instantly share code, notes, and snippets.

@Andrej123456789
Created August 27, 2022 15:32
Show Gist options
  • Save Andrej123456789/42b0056073ace3dc4cd97409b8c0a7cd to your computer and use it in GitHub Desktop.
Save Andrej123456789/42b0056073ace3dc4cd97409b8c0a7cd to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
int num;
printf("Enter a number: \n");
scanf("%d", &num);
if (num >= 0)
{
printf("Positive number. \n");
return 0;
}
if (num == 0)
{
printf("You entered 0. \n");
return 0;
}
printf("Number is negative. \n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment