C While Do For

You might also like

You are on page 1of 2

C++

1.
0.
3 5. ( do-while )
2.
5 20 50. ( do-while
)
3.
4.
0.
. ( do-while )
5. N .
. (
do-while )

6. .
( for )
7. .
:
Brojot e prost!!!
Brojot ne e prost!!!
8. 1 10
: ( for )
1
2
3
4
5
6
7
8
9
10
2
4 6
8 10 12 ............
20
3
6 9
12 15 .............................30
.
.
.
10 20 30 ...........................................100
9. : ( for )
a. S= 1+ 1/2+2/3+3/4+..+(n-1)/n
b. S= 1- 1/2 +1/3-1/4+1/5+..+/-1/n
c. S=1 * (1+2) * (1+2+3)*(1+2+3+4)*..*(1+2+3+..+n)
d. S=(1+3+5+..+2*(n-1))/n!
e. S= 1!+2!+3!+..+n!
f. S= 1+ 1/32+11/52+1/72+..+1/(2*(n-1))
10.
a = 5;
for (i =1;i<=5; i++)
a =a-i;
a =a-4;

You might also like