Create a C++ program that dynamically allocates memory for an array of integers.
The hints/ex3/
folder provides a partially implemented C++ program for calculating and displaying statistics for a set of numbers. Your task is to fill in the missing parts to make the program functional.
statistics.hpp
to guide your implementation in statistics.cpp
.std::sort
for this purpose.main.cpp
to allow the user to calculate statistics for multiple sets of numbers without exiting the program.struct
Define a struct
called Student
that represents information about a student, including their name, age, and grade average.
Create a std::vector
of 5 Student objects and initialize them with sample data.
Write a function to display the information of all students in the array.
Organize your code by separating the struct definition, data initialization, and display function into different files or modules.
Write a C++ program that simulates a simple calculator. Define functions for addition, subtraction, multiplication, and division. Allow the user to enter two numbers and choose an operation. Perform the chosen operation and display the result.
Here's a breakdown of the project structure:
calculator/
src/
main.cpp
calculator.cpp
include/
calculator.hpp
build/
(build artifacts, such as object files and executables).build.sh
(a Bash script that compiles and properly links the code)