Table of Contents

JOIN OUR SOCIAL MEDIA GROUPS

FACEBOOK GROUP: JOIN CLICK HERE

FACEBOOK PAGE: JOIN CLICK HERE

WHATSAPP GROUP 1: JOIN CLICK HERE

WHATSAPP GROUP 2: JOIN CLICK HERE

TELEGRAM GROUP: JOIN CLICK HERE

## GSC ALL SUBJECTS PAST PAPERS

GSC ALL SUBJECTS PAST PAPERS

#### GSC101 PAST PAPERS.

#### GSC201 PAST PAPERS

n in our daily lives, many things are repeated. Days and nights repeat themselves

themselves 30 times a month. The four seasons change the year. We see

the same event in real life. For example, in the payment system, some

procedures are the same for all employees. These are used repeatedly while working

and staff. So repetition is a very useful structure in the system. GSC ALL SUBJECTS PAST PAPERS

Let’s talk about the problem so that we can better understand it. We must calculate the sum of

dd numbers from 1 to 10. The following statement may

o ok. This accepted while calculating the sum of numbers from 1 to 100. d 1 on the previous number (i.e. 2) and find the nextif we have to find the next number, we have to add 1

eger i.e. 1. Add this to the sum (the sum becomes 0 + 1 = 1).

r can be obtained by adding 1 to the previous number. GSC ALL SUBJECTS PAST PAPERS

This method is correct as the syntax is correct. The answer is als

the process can also

We can write the above statement and add all the digits from 1 to 100. But this way

will not be ready to calculate the sum of numbers from 1 to 1000. In addition o

a very large number of digits will lead to u too

analyze it carefully. Our first number is 1, is there any other way to find out what th

next number? Yes, we can add 1 to a number and get the next 2 numbers. To

find the next number (i.e. 3) we are advertising

number 3.

So when to the previous full number.

We must calculate the sum of the first 1000 values by subtracting the variable number of variables

int. It is a good practice to set a flexible startup before using it. Here,

we start the variable amount with zero.

int sum = 0;

Now we get the first int

Now find the next number.

i.e. 2 and add to the sum (total becomes 1 + 2 = 3). Find the next number with addin

to the previous number and add to the sum (total is 3 + 3 = 6) and so on.

In this way, we get the next number by adding 1 to the previous number and