The floor and ceiling functions give us the nearest integer up or down.
int main(void)
{
double sayi,sonuc1,sonuc2;
printf("degeri giriniz:");
scanf("%lf",&sayi);
sonuc1=floor(sayi);
printf(" floor sonuc : %.f\n",sonuc1);
sonuc2=ceil(sayi);
printf(" ceil sonuc : %.f",sonuc2);
getch();
}
- FLOOR :int(−3.65) = −4 (the same as the Floor function)
- CEIL: int(−3.65) = −3 (the neighbouring integer closest to zero, or "just throw away the .65")
- FLOOR: int(3.65)=3
- CEIL :int(3.65)=4 or
- FLOOR:int(2.31)=2 // int(-2.32) -->-3
- CEIL:int(2.31)=3 // int(-2.31) -->-2
int main(void)
{
double sayi,sonuc1,sonuc2;
printf("degeri giriniz:");
scanf("%lf",&sayi);
sonuc1=floor(sayi);
printf(" floor sonuc : %.f\n",sonuc1);
sonuc2=ceil(sayi);
printf(" ceil sonuc : %.f",sonuc2);
getch();
}
0guitunKbrachko_1998 Jason Brandt https://wakelet.com/wake/AO5CbrGPX3KXt8hI5lMDy
YanıtlaSilapexnale
tranermon_ya-2000 Dawn Perry download
YanıtlaSilworkcontpofunc
gratper0foera-1981 Robert Ritchie Affinity Designer
YanıtlaSilThe Bat!
ReiBoot Pro
tlinbucktina