Computer Science, asked by meghana68852, 1 year ago

Program to find the give number is positive or negative in c++language

Answers

Answered by piyushatre29
0

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();

int i;

printf("\Program to check the number is positive or negative");

printf("\nenter the number to check");

scanf("%d",&i);

if(i<0)

printf("\nThe entered number is negative);

else

if(i>0)

printf("\nThe number you entered is positive");

else

printf("\nI think you entered 0 which is neither positive nor negative");

getch();

}


i hope it will help u...

if it does and u like my answer then please mark me as brainleist :0)

Answered by ridahussain86
0

\huge\bold\red{❤Answer❤}

Case 1 : Enter the number to be checked : -8 -8 is a negative number. Case 2 : Enter the number to be checked : 0 0 is a positive number. Case 2 : Enter the number to be checked : 125 125 is a positive number. Sanfoundry Global Education & Learning Series – C++ Programs.

Similar questions