标题:[求助] pow 明白含义,但不明白格式是怎么写的
取消只看楼主
bingkuboy
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-7-13
 问题点数:0 回复次数:2 
[求助] pow 明白含义,但不明白格式是怎么写的
#include <stdio.h>
#define PI 3.14159
int main()
{
printf("please input the tadius of the cone:\n");
scanf("%f",r);
printf("please input the beight of the cone:\n");
scanf("%f",h);
s=PI*r(r+pow(r*r+h*h,0.5)); /*这条我不明白是什么公式,能用数学公式写出来,好让明白啊,谢谢*/
v=PI*r*r*h;
printf("the area of the cone is %f\n",s);
printf("the volume of the cone is f",v);
return 0;
}

这里叫修改..但我定义float 也错误 . 这里我知首pow含义..但不懂用...
搜索更多相关主题的帖子: pow cone 数学 含义 
2007-07-25 22:52
bingkuboy
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-7-13
得分:0 

我希望可以帮忙改错啊.这里面并不只有这一个错误啊? 谢谢了


一个菜鸟热爱c 想向蓝天 翱翔...
2007-07-25 23:08
bingkuboy
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-7-13
得分:0 

#include <stdio.h>
#define PI 3.14159
int main()
{
float r;
float h;
float s;
float v;
double pow(double x,double y);
printf("please input the tadius of the cone:\n");
scanf("%f",&r);
printf("please input the beight of the cone:\n");
scanf("%f",&h);
s=PI*r(r+pow(r*r+h*h,0.5));
v=PI*r*r*h;
printf("the area of the cone is %f\n",s);
printf("the volume of the cone is f",v);
return 0;
}
我改成这样了.. 但还是出现两个错误 "调用未定义函数在main 中" 可能's'定义以前使用了它在main 函数中



求解啊............高手们..帮帮我吧


一个菜鸟热爱c 想向蓝天 翱翔...
2007-07-25 23:30



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-158134-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.564312 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved