You are on page 1of 2

FACULTY OF COMPUTER SCIENCE AND ENGINEERING

CS 101L-C Time: 3 hrs. Marks: 10

Instructor:Hina Ayaz Dated: 2/9/19

Lab # 1

GIK mail services and course websites, number systems, algorithms,


introduction to C++

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

You might also like