| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 370 人关注过本帖
标题:照书上写的代吗,编译通不过。什么原因啊。
只看楼主 加入收藏
foolboy8680
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2013-11-11
收藏
 问题点数:0 回复次数:4 
照书上写的代吗,编译通不过。什么原因啊。
#include<stdio.h>
int main(void)
{
    float weight;
    float value;
    printf("Are you worth your weight in rhodium?\n");
    Printf("Let's check it out.\n");
    printf("Please enter your weight in pounds:");
    scanf("%f",&weight);
    value=770*weight*14.5833;
    printf("Your weight in rhodium is worth $%.2f.\n",value);
    printf("You are easily worth that! If rhodium prices drop,\n");
    printf("eat more to maintain your value.\n");
    getch();
    return 0;
   
}

  [Linker error] undefined reference to `Printf'
  ld returned 1 exit status

这是什么原因啊。
搜索更多相关主题的帖子: maintain include return easily 
2013-11-22 20:49
chenwei435
Rank: 10Rank: 10Rank: 10
等 级:青峰侠
威 望:2
帖 子:322
专家分:1611
注 册:2010-11-28
收藏
得分:0 
程序代码:
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
    float weight;
    float value;
    printf("Are you worth your weight in rhodium?\n");
    printf("Let's check it out.\n");
    printf("Please enter your weight in pounds:");
    scanf("%f",&weight);
    value=770*weight*14.5833;
    printf("Your weight in rhodium is worth $%.2f.\n",value);
    printf("You are easily worth that! If rhodium prices drop,\n");
    printf("eat more to maintain your value.\n");
    getchar();
    return 0;
    
}

你的printf中p大写了,应该为小写
2013-11-22 20:51
残椅上的余辉
Rank: 1
等 级:新手上路
帖 子:3
专家分:1
注 册:2013-11-22
收藏
得分:0 
将一个地方改一下就OK 了
printf("Let's  check it out:\n");
printf表示输出  一定要小写,在语言中,编译时对字母的大小写是很敏感的,所以以后多注意哈就好了
希望能对你有帮助
2013-11-22 21:55
foolboy8680
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2013-11-11
收藏
得分:0 
回复 2楼 chenwei435
谢谢,在你回答前找到了,帖子也结了,不好意思 。
2013-11-23 21:39
foolboy8680
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2013-11-11
收藏
得分:0 
回复 3楼 残椅上的余辉
谢谢。
2013-11-23 21:40
快速回复:照书上写的代吗,编译通不过。什么原因啊。
数据加载中...
 
   



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

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