You are on page 1of 1

SZABIST

Fall 2020
Department of Computer Science
Fundamentals of Programming Lab 4

Lab Task Sheet


Deadline 30th October 2020 11:59pm

Task 1:
Write a C++ program using if statement to input an integer value. If the entered number is
divisible by 2 print Yes otherwise print No

Task 2:
Write a C++ program using if statement to check whether a given number ‘a’ is less than 100 or
not and if it is less than 100 than calculate a++ and display the result of ‘a’.

Task 3:
Write a C++ program using if statement to check roots of disc for quadratic equation are either
greater than 0, less than 0 or equals to 0

Task 4:
Write a C++ program to find out the grade of a student based on the marks obtained in three
subjects. The grade is calculated as:
If average is greater than 80, grade is A.
If average is less than 80 and greater than 60, grade is B.
If average is less than 60 and greater than 50, grade is C.
If average is less than 50, grade is F.

Submission Details:
1. Make a separate file for every task named after the task number e.g Task1.cpp
2. Submit all five tasks under the tab of Lab 4 on google classroom.
3. Late submissions will not get accepted.
4. Copied tasks will get zero credit.
GOOD LUCK!

You might also like