Professional Documents
Culture Documents
Lab 4 Tasks
Lab 4 Tasks
Lab # 1
Instructions
• Prefer the variable names that makes your program self-explanatory
• Make use of indentation, spaces and blank lines to increase the code feasibility with reading and
understanding
• Use the proper sentences that explains at runtime, what your program is going to perform
Lab Tasks
1. C++ program to print all the even numbers from 1 to certain number entered by user.
Using while loop
2. Write a C++ code to add numbers entered by users until the user enters zero using do
while loop
3. Write a C++ program to generate the Fibonacci series using for loop the Fibonacci series
is given as The Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21