Lab 4: Loop
Problem Set 4.1: Loop - Series
Printing Series
1, 2, 3, 4, ⋯⋯⋯, N
1, 3, 5, 7, ⋯⋯⋯, 99
2, 4, 6, 8, ⋯⋯⋯, N
1, 1, 2, 3, 5, 8, 13, 21, 34, ⋯⋯⋯, N
Summation of Series
1 + 2 + 3 + 4 + ⋯⋯ + N
1 + 3 + 5 + 7 + ⋯⋯⋯ + N
2 + 4 + 6 + 8 + ⋯⋯⋯ + N
1^2 + 3^2 + 5^2 + 7^2 + ⋯⋯⋯ + (101)^2
2^3 + 4^3 + 6^3 + 8^3 + ⋯⋯⋯ + N^3
N! = 1.2.3.4. ⋯⋯⋯ .N
Summation of N Number (No Array)
Average of N Number (No Array)
More Exercise
Count CGPA
Multiplication Table of N
Find Maximum between N Number. (No Array)
Find Minimum between N Number. (No Array)
Draw the following diagrams
N=5
* * * * * * * * * * * * * * * * * * * * * * * * *
N=5
* * * * * * * * * * * * * * *
N=5
* * * * * * * * * * * * * * *
N=5
* * * * * * * * * * * * * * *
N=5
* * * * * * * * * * * * * * *
N = 5
* * * * * * * * * * * * * * * * * * * * * * * * *
N = 5
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
N = 5
* * * * * * * * * * * * * * * * * * * * * * * * *
N = 5
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
N=5
* * * * * * * * * * * * * * *
N=5
* * * * * * * * * * * * * * *
N=5
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
N = 5
* * * * * *
* * * * * * * * * * * * * * * * * * *
Last updated