2019~2020/자료구조

square 함수

유진 2019. 4. 8. 15:53
반응형
#include <stdio.h> 
int square(int); 
int main() 
{ 
  int i; 
  for(i=1; i<=5; i++) 
  printf(" %d ",square(i)); 
} 
int square(int x) 
{ 
    return x*x; 
} 
/*  
1  4  9  16  25 
-------------------------------- 
Process exited after 0.02391 seconds with return value 4 
계속하려면 아무 키나 누르십시오 . . . 
*/
반응형