answersLogoWhite

0


Best Answer

if (n>0) printf ("%d is positive\n", n);

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: To find the positive number using if in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative


To find biggest of three number?

Let the numbers be A,B and C and assume that A ≠ B ≠ C 1) Subtract B from A. If the result is a positive number then A > B otherwise B > A. 2) Subtract the greater of A and B from C. If the result is a positive number then C is the largest number otherwise the subtrahend (either A or B) is the largest number.


How do you find the greatest of two numbers without using the if-else comparison operators?

By subtracting any two of the numbers A-B , if the output number is negative , B IS GREAT and if its positive A is great


What is the value of expression 72 divided by c?

There is not enough information available to answer this question. The result of 72 divided by c will be an error if c is zero (0), a positive number if c is positive, and a negative number if c is negative.


Write a c program to find number is positive or negative?

#include<stdio.h> #include<conio.h> void main() { int no; clrscr(); printf("Enter a Number:"); scanf("%d",&no); if(no>0) printf("Your Number is Positive"); else printf("Your number is Negative"); getch(); }


To find biggest of four numbers using if else loop?

largest number a,b,c,d


How can you get position of number from given some number by using array in c language?

Traverse the array from index 0 until you find the number. Return the index of that number.


Using the C or similar programming languages how can you find the sum of 2 big number?

There are big number libraries or (large number libraries) for computations like that.


C program to find all possible way that a number can be written as the sum of two or more positive numbers?

It is not that easy, but very interesting problem.


Write a c program to find the greatest number of from three number using switch?

Oh, well, simply: max = (a + b + c * 2 + abs(a - b) + abs(a + b - c * 2 + abs(a - b))) / 4;


Is the sum of two integers positive or negative?

If for the two integers a + b = c, a is larger than zero and b is larger than the absolute value of the first number, then c is always positive. If a is smaller than zero, and b is larger than the absolute value of the second number, then c is positive. If a is smaller than zero, and b is smaller than the absolute value of the second number, then c is negative.


How do you find a negative slope intercept of a vertical line?

A vertical line does not have a slope - negative or positive. It is not defined. A vertical line has no y intercept and, if its equation is x = c (for some number c), then the x-intercept is (c, 0).