Computer Science, asked by muskaan1411, 8 months ago

write a C plus plus program to decide whether a number is negative or positive​

Answers

Answered by ananthasai2
1

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;

}

Answered by sharansai42
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...!

Similar questions