ฟังก์ชัน sqrt ใช้ในการหารากที่ 2 หรือรูดนั้นเอง
#include <stdio.h>
#include <math.h>
main()
{
float i;
system("cls");
printf("Enter number:");
scanf("%f",&i);
printf("%.2f",sqrt(i));
getch();
}
ผลการรัน
Enter number:100
10.00