Assignment 03
Assignment 03
================================================
Subject: Computer Programming Course Code: CS02148
Time Allowed: 1 week Max Marks: 10
Examination: Assignment 03, Spring 2025 Student Name:
Due Date: 29-04-2025 Reg. No.:
================================================
Note:
Draw neat and clean labeled diagrams where necessary.
================================================
By writing the functions in Computer Programming using C++, find the solutions of the
given task related to Civil Engineering. Also analyze the results and find the major factor
that can change the results.
a) Write a C++ program by creating a function that calculates the volume of concrete.
[Hint: Volume = length × width × thickness (in cubic meters)]
b) Write a C++ program by using a function that calculates the total cost of Materials.
Use this function to:
- Calculate the cost of concrete
- Calculate the cost of steel
c) Write a C++ program by using a function to calculate load on a Column
[Hint: Load = area × height × density (kg)]
d) Write a program by using functions that can calculateUnit Conversion (Meters ↔ Feet)
e) Write a C++ program by applying a function that calculates the surface area of a pipe.
[Hint: Surface area = π × diameter × length
Use `#define PI 3.1416` or `const float PI = 3.1416`]