Sequence and Series - 33
Problem Set 4.1: Loop - Series (Practice) [33]
Print "Hello World" N times.
Printing Sequence
1, 2, 3, 4, ........., N
1, 2, 3, 4, ........., 100
1, 3, 5, 7, ........., N
1, 3, 5, 7, ........., 101
2, 4, 6, 8, ........., N
2, 4, 6, 8, ........., 100
10, 20, 30, 40, ........., N
N, N-1, N-2, ........., 4, 3, 2, 1
N, N-2, N-4, ........., 8, 6, 4, 2
N, N-2, N-4, ........., 7, 5, 3, 1
1, 2, 4, 8, 16, 32, ........., N
3, 6, 12, 24, 48, ........., N
1, 3, 6, 10, 15, 21, ........., N
1, 4, 9, 16, 25, 36, 49, ........., N
1, 11, 111, 1111, ........., N
1, 1, 2, 3, 5, 8, 13, 21, 34, ........., N [Fibonacci Sequence]
0, 0, 1, 1, 2, 4, 7, 13, 24, ........., N [Tribonacci Sequence]
2, 3, 5, 7, 11, 13, ........., N [Prime Number Sequence]
Summation/Factorial of Series
1 + 2 + 3 + 4 + ......... + N
N + (N-1) + (N-2) + ......... + 4 + 3 + 2 + 1
1 + 3 + 5 + 7 + ......... + N
N + (N-2) + (N-4) + ......... + 7 + 5 + 3 + 1
2 + 4 + 6 + 8 + ......... + N
N + (N-2) + (N-4) + ......... + 8 + 6 + 4 + 2
1 + 4 + 7 + 11 + ......... + N
5 + 10 + 15 + 20 + ......... + N
N + (N-7) + (N-14) + (N-21) + ......... + 28 + 21 + 14 + 7
1^2 + 2^2 + 3^2 + 4^2 + ......... + N^2
1^2 + 3^2 + 5^2 + 7^2 + ......... + N^2
2^3 + 4^3 + 6^3 + 8^3 + ......... + N^3
3^2 + 7^2 + 11^2 + ......... + n^2
N^2 + (N-10)^2 + (n-20)^2 + .........+ 40^2 + 30^2 + 20^2 + 10^2
N! = 1 × 2 × 3 × 4 × ......... × N [Factorial]
More Exercise
Count GPA (Take Grade Point and Credit for N Course as Input and Calculate GPA)
Multiplication Table of N
Last updated