Lab Manual Lab 3
Visual Logic
Problem Solving using Flow Charts
Session: Fall 2013
Faculty of Information Technology
UCP Lahore Pakistan
Lab Content
This lab is focused on training students on Visual Logic to enhance their problem solving skills.
Lab Task 1
Write a program that reads three nonzero integers and determines and prints if they could be the sides of a right triangle.
(Hint: Use Pythagoras theorem).
Lab Task 2
The cost of an international call from New York to Pakistan is calculated as follows: Connection fee is $1.99. Charges for first three minutes are $2.00 and $0.45 are charged for each additional minute. Write a program that prompts the user to enter the number of minutes the call lasted and outputs the amount due.
Lab Task 3
(Separating Digits in an Integer) Write pseudo code and design flow chart that inputs one five-digit number separates the number into its individual digits and prints the digits separated from one another.
Lab Task 4
Design flow chart of a BMI calculator application that reads the user’s weight and height and then calculates and displays the user’s body mass index. The formula for calculating BMI is:
BMI = Weight / (Height * Height) unit: Height is in meter
Also, the application should display the following information from the scale provided below.
BMI VALUES
Underweight: less than 18.5
Normal: between 18.5 and 24.9
Overweight: between 25 and 29.9
Obese: 30 or greater
Lab Task 5
Design flow chart that will determine if a department store customer has exceeded the credit limit on a charge account. For each customer, the following facts are available:
a) Account number
b) Balance at the beginning of the month
c) Total of all items charged by this customer this month
d) Total of all credits applied to this customer's account this month
e) Allowed credit limit
The application should input each of these facts, calculate the new balance =