- cstdio[meta header]
- std[meta namespace]
- function[meta id-type]
namespace std {
int scanf(const char * format, ...);
}標準入力から、指定された書式文字列を使用してデータを入力する。
#include <cstdio>
int main() {
int n;
std::scanf("%d", &n);
std::printf("%d\n", n);
}- std::scanf[color ff0000]
- std::printf[link /reference/cstdio/printf.md]
123
123
- Clang: ??
- GCC: ??
- Visual C++: ??