0% found this document useful (0 votes)
48 views

Lab Assignment

Uploaded by

YUSRA ANSAR
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Lab Assignment

Uploaded by

YUSRA ANSAR
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Department of Computer Science Programming Fundamentals

Lab-Assignment
Marks [10]
1. Write a program that accepts two numbers a and b and checks whether or
not a is divisible by b.
2. Write a program to accept 2 numbers and tell whether the product of the
two numbers is equal to or greater than 1000.
3. Montek company gives allowances to its employees depending on their
grade as follows:

Calculate the salary at the end of the month. (Accept Salary and Grade
from the user).
4. Write a program to evaluate the Grade of a student for the following
constraints:
If marks > 75 – grade A
If 60 < marks < 75 – grade B
If 45 < marks<60 – grade C
If 35 < marks<45 - grade D
If marks < 35 – grade E
5. Use the printf() statement and do the following :
Print out the value of the integer variable sum
Print out the text string “Welcome”, followed by a new line.
Print out the character variable letter
Print out the float variable discount
Print out the float variable dump using two decimal places
Use the scanf() statement and do the following:
To read a decimal value from the keyboard, into the integer variable sum
To read a float variable into the variable discount- rate.

You might also like