NAME: UROOJ ASGHAR KHAN
ENROLLMENT NO.: 02-135242-006
CP LAB ASSIGNMENT #02
Task 1: World Travel Planner
Assume that you are developing for a World Travel Planner program in C++ that
caters to globetrotters. The program should assist users in planning their
international travels by allowing them to convert distances from miles to
kilometers. Users will input the distance in miles, and the program will output
the converted distance in kilometers, considering the international metric system
commonly used in many countries. 1 mile = 1.60934 kilometers.
SOLUTION:
Task 2: Bank Account Transactions
Asad is managing his bank account and intends to carry out two
transactions. Initially, he plans to withdraw Rs. 2000 in cash, followed
by a deposit of Rs. 10,000 into his account. Your task is to create a
simple C++ program to facilitate these transactions. Display the account
balance after each transaction. Write a C++ program to realize the
specified scenario.
PAGE#01
DATE:19-SEP-2024
, BS (IT), SEMESTER #01, CP LAB ASSIGNMENT#02
NAME: UROOJ ASGHAR KHAN
ENROLLMENT NO.: 02-135242-006
Solution:
Task 3: Day of the week
Write a program that takes a date as input and prints the day of the week
that date falls on. Your program should take three input parameters: m
(month), d (day), and y (year). For m, use 1 for January, 2 for February,
and so forth.
Output will be 0 for Sunday, 1 for Monday, and so forth.
Use the following formulas, for the Gregorian calendar:
Solution:
PAGE#02
DATE:19-SEP-2024