write a C plus plus program to decide whether a number is negative or positive
Answers
Explanation:
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int A;
printf("Enter the number A: ");
scanf("%d", &A);
if (A > 0)
printf("%d is positive.", A);
else if (A < 0)
printf("%d is negative.", A);
else if (A == 0)
printf("%d is zero.", A);
return 0;
}
Below is the C program to find whether a number is positive, negative or zero.
#include <stdio.h>
int main()
{
int A;
printf("Enter the number A: ");
scanf("%d", &A);
if (A > 0)
printf("%d is positive.", A);
else if (A < 0)
printf("%d is negative.", A);
else if (A == 0)
printf("%d is zero.", A);
return 0;
}
Hope it helps...
please make brainliest...!