Ask your own question, for FREE!
Computer Science 27 Online
OpenStudy (anonymous):

Write a c++ program that accept a positive no. and then display the sum of all the no. form 1 up to the no. imputed. (for loop) sample run: Enter a no: 5 The sum is: 15

OpenStudy (anonymous):

int sum=0; for(int i=0;i<5;i++) {sum=sum+i; } cout<<sum<<endl;

OpenStudy (anonymous):

1+2+3+4+5= 15

OpenStudy (anonymous):

oh. . i mean any positive number imputed.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!