Square Root Of Any Number
#include<math.h>
int kare(int y){
double z;
z=sqrt(y);
//sqrt() function is defined in math.h library it returns double values that's why I declare z as double.
printf("%.2f\n",z);
printf("%.2f\n",z);
}
int main (){
int i;
printf("Enter the number");
scanf("%d",&i);
kare(i);
return 0;
}
return 0;
}
Hiç yorum yok:
Yorum Gönder