ช่วยหน่อยครับ
มันติด 0.00ทุกตัวเลย แล้วก็ช่วยอธิบายเหตุผลให้รู้ด้วยได้ไหมครับ
#include<stdio.h> #include<stdlib.h> int main() { float r,circumference,area,volume,surface; printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); printf("\n****************************Program Circle******************************* \n"); printf("Please input radius : "); scanf("%f",&r); printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); circumference=2*3.14*r ; area=3.14*r*r ; volume=(4/3)*3.14*r*r*r ; surface=4*3.14*r*r ; printf("\nCircumference is %.2f \n",&circumference); ; printf("Circle area is %.2f \n",&area); ; printf("Volume of sphere is %.2f \n",&volume); ; printf("Surface area of a sphere is %.2f",&surface); ; printf("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); system("pause"); }
|