Answer to Question #296555 in C for Thank you!

Question #296555

The first line will contain a message prompt to input the integer.

The second line contains "Positive" if the integer is positive, or "Negative" if it isn't.

Enter·n:·-12
Negative
1
Expert's answer
2022-02-11T11:57:00-0500


#include<stdio.h>


int main(){
	int number;


	printf("Enter n: ");
	scanf("%d",&number);


	if(number>=0){
		printf("Positive\n");
	}else{
		printf("Negative\n");
	}




	scanf("%d",&number);
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS