This repository contains two beginner-friendly C++ exercises built around the following topics:
- Introduction to C++, installing VS Code, g++ & more
- Basic structure of a C++ program
- Variables & comments in C++
- Variable scope & data types in C++
- C++ basic input/output
Work to complete
- q1: A short fill-in-the-blanks exercise focusing on program structure, variables, comments, and simple I/O.
- q2: A small full-program exercise that practices data types, scope, and basic input/output.
Each question lives in its own folder (q1/, q2/) and contains:
qX.cpp— the source (either a template with "fill here" comments or a blank starter file).README.md— clear instructions, input/outputs, and what to fill/implement.
How to compile & run (macOS / zsh):
# compile
g++ -std=c++17 -Wall -Wextra q1/q1.cpp -o q1/q1
g++ -std=c++17 -Wall -Wextra q2/q2.cpp -o q2/q2
# run
./q1/q1
./q2/q2What to submit
- Edit the
q1/q1.cppandq2/q2.cppfiles to implement the solutions requested in their READMEs. - Commit and push your changes to YOUR FORKED REPOSITORY.
Grading hints
- Correctness: output must match the expected sample output in each question's README.
- Readability: use meaningful variable names and comments.
- Demonstration of concepts: show that you understand program structure, variables, scope, and basic I/O.
Proceed to the q1/ and q2/ folders and complete the exercises in order.