Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
#include
using namespace std; int main() { int peopleInRoom = 0; cout << "People in room: " << peopleInRoom << "\n"; // 3 people enter peopleInRoom++; cout << "One person entered. People in room: " << peopleInRoom << "\n"; peopleInRoom++; cout << "One person entered. People in room: " << peopleInRoom << "\n"; peopleInRoom++; cout << "One person entered. People in room: " << peopleInRoom << "\n"; // 1 person leaves peopleInRoom--; cout << "One person left. People in room: " << peopleInRoom << "\n"; return 0; }
People in room: 0
One person entered. People in room: 1
One person entered. People in room: 2
One person entered. People in room: 3
One person left. People in room: 2