Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

C++ People Counter

A beginner-friendly C++ console application that calculates the current number of people in a room based on the number of people entering and leaving.

Features

  • Takes the initial number of people as input
  • Takes the number of people entering
  • Takes the number of people leaving
  • Calculates the current number of people in the room
  • Calculates total people movement
  • Calculates the net change in the number of people

Concepts Used

  • Variables
  • Integer data types (int)
  • User input with cin
  • Output with cout
  • Arithmetic operators (+ and -)
  • Assignment operator (=)
  • New lines using \n

How It Works

The program asks the user for three values:

  1. Current number of people in the room
  2. Number of people who entered
  3. Number of people who left

It then calculates:

Current People

Initial People + People Entered - People Left

About

A simple C++ people counter demonstrating variables, user input, arithmetic operators, and basic input/output.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages