The ones who are crazy enough to think they can change the world are the ones who do.- Steve Jobs
Let us write a C program to find whether user entered number is positive or negative.
#include <stdio.h> int main() { int num; printf("\n Enter the integer number : "); scanf("%d",&num); if(num >= 0) { printf("\n%d is a positive number", num); } else { printf("\n%d is a negative number", num); } return 0; }
Enter the integer number : - 4 - 4 is a negative number
Here we used if conditional statement to find whether the number is positive or negative.
We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.
© Copyright 2019