7. write a Program to find the given number is positive or not?
#include
#include
void main()
{
int a;
clrscr();
printf("enter the number");
scanf('%d",&a);
if(a>0)
{
printf("no is Positive");
}
printf("no. is not positive");
getch();
}
Algorithum
1.start
2.read a
3. if a>0
4.print no. is +ive
5.stop
Result
The program is sucessfully executed and desired output is obtained.
Output
Enter the number
2
no. is +ive
The given number is positive or not
Labels: C-program
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment