answersLogoWhite

0


Best Answer

int sum = 0;

int n = 0;

while( sum <= 999 ) {

sum += (++n);

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program to find the sum of all positive number and terminate the program when sum exceed 999?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Does an irrational number terminate?

Its decimal representation does not terminate.


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


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.)


Can a number both repeat and terminate?

No.


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.


Why numbers cannot exceed 9?

the number that cannot exceed neni is Q


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.


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? =


Does every prime number terminate or repeat?

Every prime number terminates.


How much does a number exceed a number?

5,000/mm3.


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(); }