0% found this document useful (0 votes)
24 views1 page

Act 6 - C++ Conditional B

Uploaded by

Khysval Walker
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)
24 views1 page

Act 6 - C++ Conditional B

Uploaded by

Khysval Walker
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/ 1

COMPROG

Computer Programming (OOP)


Laboratory

Activity 6: C++ Conditional B

Overview: The simplest form of flow control in C++ is the branch statement. This instruction
allows the program to decide which of two paths to take through C++
instructions, based on the results of a logical expression. The branch statement is
implemented using the if statement.

In this activity, student will be able to create a program that implements a


conditional program flow control.

File Name: Lastname_Act6

Description: Based on an automobile’s model year and weight, TPLEX determines the car’s
weight class and registration fee using the following schedule:

Requirements Using this information, write a C++ program that accepts the year and weight of
an automobile (in lbs.) and determine and display the weight class and
registration fee for a car.

Test Case
Enter Model Year: 1977
Weight (lbs) : 3000 lbs
Weight class = 5
Registration Fee = Php 440.00

Enter Model Year: 2000


Weight (lbs) : 2700 lbs
Weight class = 7
Registration Fee = Php 385.25

You might also like