bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/C++/C++ Tutorial
C++•C++ Tutorial

C++ Output Numbers

C++ Print Numbers

You can also use cout() to print numbers.

However, unlike text, we don't put numbers inside double quotes:

Example

#include <iostream>
using namespace std;
int main() {
  cout << 3;
  return 0;
}

Example

cout << 3 + 3;

Example

cout << 2 * 5;

Previous

C++ Output (Print Text)

Next

C++ New Lines