answersLogoWhite

0

int sum = 0;

int n = 0;

while( sum <= 999 ) {

sum += (++n);

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Does an irrational number terminate?

Its decimal representation does not terminate.


What happens when you multiply a positive number by a number greater then one?

When you multiply a positive number by a number greater than one, the result is a larger positive number. This is because the operation effectively increases the original number. For example, multiplying 3 by 2 results in 6, which is greater than 3. Thus, the product will always exceed the original positive number.


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


What is the code of a c program that will read in a positive integer value and determine If the integer is a prime number and If the integer is a Fibonacci number?

see the program


Can a number both repeat and terminate?

No.


Is negative 3 irrational?

No, -3 is a rational number. All fractions are rational along with all decimals that terminate or repeat. (this applies to both positive and negative numbers.)


Is 0.2468 an whole number?

We just learned this in math class today :) A whole number is any positive, negative number without a decimal; it doesn't repeat or terminate. It's just a number. Like 58 or even 343737. Hope I helped.


Can we include irrational numbers in the set of positive numbers?

Yes, any positive number is a number that doesn't have a (-) behind it (-20; -23.67; -45.45454...), and is not zero (0). Any repeating number (see 3rd negative example) is irrational, no matter what its sign. Irrational numbers also include numbers (decimals, specifically) that don't repeat, but don't stop. Numbers that don't terminate include pi. Pi, as it is, is proof of a positive irrational number.


Does every prime number terminate or repeat?

Every prime number terminates.


Write a program which will rise any number X to a positive power nobtain values of X and n from user?

user-generated content: disclaimer report abuse = Write a program which will rise any number X to a positive power nobtain values of X and n from user? =


Why numbers cannot exceed 9?

the number that cannot exceed neni is Q


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

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