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

Assignment #2 and Assignment #3

The document provides instructions for Assignment 2 and Assignment 3 for a Programming Fundamentals course. Assignment 2 involves creating a program that converts between different units of measurement for distance, volume, and temperature, with error handling. Assignment 3 involves creating a program that takes a starting number and length as input to output the corresponding Fibonacci sequence. The document also provides submission instructions requiring students to include their name in the code comments, email their .cpp files by the deadline to a specific email address with their name in the subject line and body.

Uploaded by

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

Assignment #2 and Assignment #3

The document provides instructions for Assignment 2 and Assignment 3 for a Programming Fundamentals course. Assignment 2 involves creating a program that converts between different units of measurement for distance, volume, and temperature, with error handling. Assignment 3 involves creating a program that takes a starting number and length as input to output the corresponding Fibonacci sequence. The document also provides submission instructions requiring students to include their name in the code comments, email their .cpp files by the deadline to a specific email address with their name in the subject line and body.

Uploaded by

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

Programming Fundamentals

Institute of Computing

Assignment #2 and Assignment #3


Assignment 2:
Make a program that would convert different types of unit of measurements.
The program should have options for types of measurements such as
distance, volume and temperature. Please implement ERROR HANDLING for
wrong input of choices. Syntax is shown below.
Choices of Measurements
1. Distance
2. Volume
3. Temperature
User will choose what to measure on the corresponding integer value of each
measurement. (1) Distance (2) Volume
(3) Temperature
If choice is (1) Distance: User will then be asked for an input
numeric (i.e. floating or integer value in METERS)
Enter Length (m):
User will then be prompted with a choices of the conversions below with the
corresponding integer choices:
Display distance in:
1. Kilometer
2. Yard
3. Centimeter
The program should display the output of the specific unit of conversion
depending on the input that was provided by the user.
Follow the syntax for the remaining 2 Choices of Measurements Volume and
Temperature.
If choice is Volume:
Enter Length(m) :
Enter Width(m) :
Enter Height(m) :

Programming Fundamentals

Display volume in:


1. cubic meter
2. cubic centimeter
3. cubic inch
If choice is Temperature:
Enter Temperature (celsius) :
Display temperature in:
1. Fahrenheit
2. Kelvin
Sample Program Output:

Institute of Computing

Programming Fundamentals

Institute of Computing

Assignment 3
Create a program that will ask a user an input integer as the first term of the
Fibonacci sequence and an input integers as the length of the sequence. The
program should output the sequence depending on the length given by the
user.

Submission Instructions (Failure to follow merits rejection of


submission):

Deadline: January 23, before 10PM


File naming format example: LastnameFNI_Assign2.cpp and
LastnameFNI_Assign3.cpp
NOTE: File naming may vary per section MATH and STAT will follow
the BY PAIR format just like your previous submission for
Assignment 1. BSEd-Math will follow the QUARTET format for file
naming as per your previous submission

Write your full name/s as a C++ comment in the first line of the
code.

Programming Fundamentals

Institute of Computing

E-mail your file to [email protected] with the following


subject header per section:
Math18_BSeD-Math-3D_Assign2-3 BSEd-Math
CS12_MATH_Assign2-3 BS in Mathematics
CS12_STAT_Assign2-3 BS in Statistics
Attach your 2 (two) .cpp files on the email
Write your FULL NAMES in the e-mail body.

You might also like