Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
14 views3 pages

Programming Fundamentals Assignment 2 Instructions:: (Loop Is Not Allowed)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Programming Fundamentals Assignment 2 Instructions:: (Loop Is Not Allowed)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Programming Fundamentals Assignment 2

Instructions:
 Assignment must be submitted handwritten.
 Assignment must have a cover page including students registration number, name,
discipline (BSSE, BSAI, BSCS) and section
 Copied assignment will be marked 0
 Assignment must be submitted in second lecture of week 8
 After dead line assignment will not be accepted
 You are also required to solution file of your assignment in lab.

Note: All the question carry 20 marks.


Program 1: Input five characters from user. Assume that these five characters are characters of
password and print strength of a password. If all characters are alphabet print 'Low strength'. If all
characters are digits print 'Low strength'
If some characters are digits and some are alphabets print 'Medium strength'. If some characters
are digits, some are alphabets and some are other than alphabets and digits print 'Strong Strength'
Program 2: Write a C++ program that Inputs a number from user and tell whether the number is
Prime or not. (Loop is not allowed).
Program 3: Write a C++ program that inputs a 3 digit number and tell whether number is
palindrome number or number. Palindrome numbers are those that reads same in straight and
reverse order.
Hint: As we are talking about digit numbers only. A number who’s first and last digit is same will
be palindrome in case of 3 digit.
Program 4: Input marks of 4 subjects along with total marks of each subject calculate percentage
also print grade of student grading criteria is as follow.
Percentage greater than 80 is A+

Percentage greater than 70 and less than 81 is A

Percentage greater than equal to 65 and less than equal to 70 is B

Percentage less than 65 and greater than is 55 is C

Below 56 is F

Program 5: A student buys lab manuals for three subject PF, DB and Java. You have to input
quantity of PF, DB and Java to be purchased by student. Input selling price of PF, DB and Java
lab manuals. After that input whether student is from BIIT or not if user enters “b” (not case
sensitive) it means student is from BIIT otherwise student is not from BIIT. Provide 20% discount
to all BIIT students. Student from other institutes are provided 5% discount if bill exceeds 30,000.
You have to display Bill without discount, discount amount and bill after discount.

Program 6: Input a number from user. If number is even and not divisible by 5 and 3 display
“Even not divisible by 5 and 3”. If number is even and divisible by 5 but not by 3 display “Even
divisible by 5 but not by 3”. If number is even and not divisible by 5 but divisible by 3 display
“Even not divisible by 5 but divisible by 3”. If number not even tell whether it is divisible by 5 or
by 3 or by both (only 1 message should be displayed).
Program 7: BMI is used to broadly define different weight groups in adults 20 years old or older.
The same groups apply to both men and women. The formula is BMI = kg/m2 where kg is a
person’s weight in kilograms and m2 is their height in meters squared. You have to take input of
height and weight, calculate BMI and Display Message Underweight, normal weight, over weight
and obese using following. Underweight: BMI is less than 18.5
BMI Value Description
18.5 – 24.9 Normal weight
25 – 29.9 Over weight
>= 30 Obese

Program 8: Blood pressure readings have two numbers, for example 140/90mmHg.
The top number is your systolic blood pressure. The bottom one is your diastolic blood pressure.
Take the systolic and diastolic blood pressure as input and display High blood pressure, Pre-high
blood pressure, Ideal blood pressure and Low blood pressure.

Program 9: The admission criteria in BSCS and BSIT at BIIT is 45 percent marks in the
intermediate with at least one subject (Physics , math, statistic, Computer Science).The maximum
age limit is 24. Develop a program which take input age, percentage as well as verification about
subject studied. (Input for percentage is Float, for Age is integer and for Subject study is Character
i.e. ‘Y’ for yes and ‘N’ for No).
If student satisfies admission criteria display message “You are eligible” otherwise display
message you are not eligible.
Program 10: Profit on Fix Deposit in Bank; A bank offers following profit policy on fix deposit.
 No profit if amount is less than 200,000 or amount is deposited for less than 6 months.
 Profit is 5% if amount is greater than equal to 200,000 and less than 400,000 and deposited
for more than equal to six months and less than equal to 12 months.
 Profit is 7% if amount is greater than equal to 200,000 and less than 400,000 and deposited
for more than to 12 months and less than equal to 24 months.
 Profit is 10% if amount is greater than equal to 400,000 and less than 600,000 and deposited
for more than equal to 6 months and less than equal to 12 months.
 Profit is 12% if amount is greater than equal to 400,000 and less than 600,000 and deposited
for more than to 12 months and less than equal to 24 months.
 Otherwise profit is 14%
You have to write a code that will read amount and number of months from user and calculate &
show the profit. Also you have to display total amount after profit.

You might also like