WSQ07 – Sum of Numbers

HELLOOOOO

Guys this is a fast one, you just need a little bit of logic and think. The user will give you two integer numbers, one bigger than the other (make sure the smaller is the firt the user gives with an IF clause) and the program will show you the sum of numbers between them.

PROGRAM

There is my program if you want to take a look

do{
sum=sum+c;
c=c+1;
}while(c<=n2);

So that is the main part, the tricky thing is the counter, lot of people do not know how to use it and that is when it gets hard, but when you practice and practice with counters it gets really REALLY easy.

Thank you.

CC BY-SA 4.0 WSQ07 – Sum of Numbers by alibarramg is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.