← Playground
C++
G++ 15.2 (C++20) · Compiler Explorer
Ctrl+Enter (⌘+Enter) to run
main.cpp
stdin
Type the input your program will read.
Output
Output shows up here.
C and C++ code is sent to Compiler Explorer (godbolt.org) to compile and run. Everything else runs inside your browser.