在线编C语言程序

来源:百度知道 编辑:UC知道 时间:2024/05/09 10:34:14
球体体积计算公式为V=4/3ZR⒊,试编制程序,输入球体半径R后,可计算出球体体积V

main()
{
float r,v,r,pi;
pi=3.14;
scanf ("%f",&r);
printf ("体积为%f",(4/3)*r*r*r*pi);

}

#include <stdio.h>
void main()
{float pi=3.1415926,R,V;
scanf("%f",&R);
V=(4.0/3.0)*pi*R*R*R;
printf("%f\n",V);
}

大家帮个忙运一下
有个错误不知道怎么改
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "ctype.h"
#define M 50
struct customermessage
{int num;
char name[];
int money;
char A[20];
char B[20];
char DJ[5];
char start_time[15];
char stop_time[15];
char if_over[5];
};
typedef struct customermessage CM;
int Init (CM t[]); /*输入记录*/
void List (CM t[],int n); /*显示记录*/
void SearchOnName (CM t[],int n); /*按名称查找记录*/
void SearchOnType (CM t[],int n); /*按类型查找记录*/
int DeleteRecord (CM t[],int n); /*删除