Ask your own question, for FREE!
Mathematics 19 Online
OpenStudy (anonymous):

write program to show s=1+2+3+4......+n in c++?

OpenStudy (kc_kennylau):

count=0 for (i=0;i<n;i++){ count=count+i; } cout<< count <<end1;

OpenStudy (kc_kennylau):

First time writing c++, so please test it first :)

OpenStudy (anonymous):

i can change count?

OpenStudy (anonymous):

write in java

OpenStudy (kc_kennylau):

int count=0; for(int i=1;i<=n;i++){ count+=i; } System.out.println(count); 2ND ATTEMPT ON C++ XD: int count=0; for(int i=1;i<=n;i++){ count=count+i; } cout<< count <<end1;

OpenStudy (anonymous):

write code factorial java input by user

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!