본문 바로가기
Programing

C언어 제곱, 루트

by 밴스 2009. 4. 1.
728x90

C언어에서 제곱($x^y$)을 구하는 함수 :

pow(x, y)

 

C언어에서 root($\sqrt{x}$)를 구하는 함수 :

sqrt(x)

 

 


 

코드 제일 제일 윗부분에

#include <math.h>

를 추가해 주어야 함

반응형

'Programing' 카테고리의 다른 글

Perceptron Traning Algorithm  (0) 2010.04.04
[MFC] 웹, http, html 자동로그인  (0) 2009.11.09
add files to folder 창이 안뜰때  (0) 2009.05.03
동적메모리, 배열 할당하는 법  (0) 2009.04.02
cout 사용법  (0) 2007.12.03

댓글