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
Social Sciences,
8 months ago
Math,
8 months ago
English,
8 months ago
Math,
1 year ago
Biology,
1 year ago