ipow.c
来自「shpf 1.9一个并行编译器」· C语言 代码 · 共 32 行
C
32 行
//======================================================================
// NPAC $Id: ipow.C,v 1.1 1996/09/23 22:34:33 dbc Exp $
//======================================================================
int ipow(int i, int j) {
// _____________________________________________________________________
//| |
//| Function to return the i raised to the power j. |
//| |
//| H W Yau. 1st of February, 1995. |
//| Northeast Parallel Architectures Center. |
//| Syracuse University. |
//|_____________________________________________________________________|
//| |
//| Edit record: |
//| 01/Jan/1995: First edit. |
//| 16/Feb/1995: Removed PURE declaration of this function, PGI does |
//| not like it. |
//| 20/Aug/1996: PGI compiler now likes PURE attribute. |
//|_____________________________________________________________________|
int k, tmp ;
tmp = 1 ;
for(k = 1 ; k <= j ; k++)
tmp = tmp * i ;
return tmp ;
}
//======================================================================
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?