PPS Practical 8
- Aim: Write a C program to find that the accepted number is Negative, or Positive or Zero.
- Code:
//For turbo C++ remove below comments #include <stdio.h> //#include<conio.h> void main() { int d; // clrscr(); printf("Enter Number : "); scanf("%d", &d); if (d > 0){ printf("Number is greater than zero"); }else if (d < 0){ printf("Number is less than zero"); }else{ printf("Number is zero"); } // getch(); }
- Output:

Comments
Post a Comment