So strange output!!!!!!!!!!

janks 2003-10-11 11:38:27
I am doing a program below, but its output FP is very big, though i give its value is
small enough!
#include <stdio.h>
#define DENW 1000.0
#define GG 9.8
/*my first c program*/
int main(void)
{
double fp, vp;

printf(" Comprex Stdio,Inc \n");
printf("Power operate program\n");
printf(" Now Begin \n");
printf("\n\nNow please enter the value of vp:");
scanf("%e",&vp);
printf("\nOK! Finished!!\n");
printf("The FP = %d!\n",DENW*GG*vp);
return 0;
}
and the FP output show on the screen is 1689403985873!!!???
...全文
53 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Wolf0403 2003-10-12
  • 打赏
  • 举报
回复
janks, just publish how you solved your problem here and let's learn something, all right?
daizh 2003-10-12
  • 打赏
  • 举报
回复
error usage in scanf("%e",&vp);
flashsj 2003-10-11
  • 打赏
  • 举报
回复
ft
janks 2003-10-11
  • 打赏
  • 举报
回复
ok!problem solved!

70,037

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧