Skip to content

Sum from input

C++ cin / cout

Same task in: GoRust

Flowchart (ISO 5807)

StartInput a, bOutput a + bEndFigure 1 — addTwo

Source code

C++
void addTwo() {
    int a, b;
    std::cin >> a >> b;
    std::cout << a + b;
}

The editor opens with this code — change it and the chart redraws.

Language
C++
Constructs
cin / cout
Topic
Input/Output
Formats
Word, Visio, draw.io, PDF, SVG

Related examples