Lab 2.. OOP Preston Uni
Lab 2.. OOP Preston Uni
Submitted to:
Lab # 2
Section: BSCS(E)
Program No#3:
Sales Bar Chart [7]) Write a program that asks the user to enter today's sales for five stores. The program should
then display a bar graph comparing each store's sales. Create each bar in the bar graph by displaying a row of
asterisks. Each asterisk should represent Rs100 of sales
Program No#4:
Body Mass Index [6] Write a program that calculates and displays a person's body mass index (BMI). The BMI is often
used to determine whether a person with a sedentary lifestyle is over-weight or underweight for his or her height. A
person's BMI is calculated with the following formula: BMI = weight in kilograms (height in meters) where weight is
measured in kilograms and height is measured in meters. The program should display a message indicating whether
the person has optimal weight, is underweight, or is overweight. A sedentary person's weight is considered to be
optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be
underweight. If the BMI value is greater than 25, the person is considered to be overweight.
Program No#5:
Write a program that reads in a five-digit integer and determines whether it's a palindrome.