Complete the folowing function procedure to calculate the sum of the sum from 1 to N. (Sum = 1+2+__+N) , N is entered as the inp | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Complete the folowing function procedure to calculate the sum of the sum from 1 to N. (Sum = 1+2+__+N) , N is entered as the inp

Vb.net

25th Sep 2017, 8:01 AM
Dries
Dries - avatar
2 Answers
+ 6
int sum=0; int i; for (i=1;i<=N;i++){sum+=i;} cout<<sum;
25th Sep 2017, 8:12 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
Oh my gosh i just saw that vb.net!!
25th Sep 2017, 8:15 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar