a250sqr.cpp

来自「secondo esempi vari per c++ (schema base」· C++ 代码 · 共 19 行

CPP
19
字号
// nuovi concetti: prototipo di funzione
#include <iostream>

using namespace std;

int sqr(int);           // prototipo della funzione 'sqr'

int main() {
 for (int i=0; i < 6; i++)
    cout << '\t' << i << '\t' << sqr(i) << endl;
 cout << endl;
 return 0;
}

int sqr(int n) {
 return n * n;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?