My First C++ Program

Build your first complete C++ program step by step. Start with Hello World and progressively add variables, user input, and calculations to create a practical rectangle area calculator.

~0.8 hours
5 steps
Download & Run Locally

Support Free C++ Education

Help us keep this platform free for everyone! Your support enables us to create more high-quality lessons, exercises, and interactive content.

Become a Patron

What You'll Build

A complete C++ program that interacts with users to calculate the area of a rectangle. You'll start with the classic Hello World program and progressively add new concepts until you have a fully functional calculator that demonstrates fundamental C++ programming skills.

Learning Objectives

  • Write your first Hello World program
  • Declare and initialize variables
  • Use std::cout for output and std::cin for input
  • Perform basic arithmetic operations
  • Create interactive programs that communicate with users

Ready to Start?

Start Project

Sign in to retain your progress

Project Steps

Step 1

Hello World - Your First C++ Program

Write the classic Hello World program - every programmer's first step into a new language.

~10 min
Step 2

Adding Variables to Store Information

Learn how to declare and use variables to store data in your programs.

~8 min
Step 3

Reading User Input with std::cin

Make your program interactive by reading input from users.

~8 min
Step 4

Performing Calculations with Arithmetic Operators

Learn to perform mathematical operations and calculations with user input.

~10 min
Step 5

Complete Rectangle Area Calculator

Build a complete, polished rectangle area calculator using all the concepts you've learned.

~12 min

Project Repository

See the final version of this project on GitHub. Please report any issues there.

View on GitHub

Ready to Start?

Start Project

Sign in to retain your progress