logic for c programe to check for positive , negative and , zero numbers
Answers
Answered by
1
see the attached file
Attachments:
Revolution:
don't think i copied it....i export it as pdf
Answered by
0
#include<iostream.h>
void main()
{
cout<<"enter any no.";
cin>>a;
if (a < 0)
{
cout<<"negative";
}
else if (a>0)
{
cout<<"positive";
}
else
{
cout<<"the no. is 0";
}
}
void main()
{
cout<<"enter any no.";
cin>>a;
if (a < 0)
{
cout<<"negative";
}
else if (a>0)
{
cout<<"positive";
}
else
{
cout<<"the no. is 0";
}
}
Similar questions