--运行失败--
Command failed: "C:\AhaCpp\resources\core\bin\gcc.exe" "C:\Users\Administrator\Desktop\1.c" -o "C:\Users\Administrator\Desktop\1.exe"
C:\Users\Administrator\Desktop\1.c:1:19: warning: extra tokens at end of #include directive
#include <stdio.h>#include <stdlib.h>#include <conio.h>#include <windows.h>#include <time.h>int main(){ int a,b,c,d,i,f,g; char q; a=0; b=0; c=0; d=0; i=0; f=0; g=0; printf(" 计算面积\n"); printf(" 1:正方形 2:长方形 3:三角形 4:平行四边形 5:梯形\n"); printf(" 输入1~5有效,其他无效"); q=getch(); if (q=5) system("cls"); printf("上底 下底 高"); scanf("",&a,&b,&c); i=(a+b)c/2; printf("%d",i); system("pause"); return 0; } if (q=4) { system("cls"); printf("底 高"); scanf("%d%d",&a,&b); i=ab; printf("%d",i); system("pause"); return 0; } if (q=3) { system("cls"); printf("底 高"); i=ab/2; printf("%d",i); system("pause"); return 0; } if (q=2) {system("cls"); printf("长 宽");scanf("%d%d",&a,&b); i=ab; printf("%d",i); system("pause"); return 0; } if (q=1) { system("cls"); printf("长"); scanf("%d",&a); i=a*a; printf("%d",i); system("pause"); return 0; }
^
c:/ahacpp/resources/core/bin/../lib/gcc/mingw32/5.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
1. 关于#c语言#的问题:这个printf到底出现什么问题啊!
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- Staringabyss 2021-12-14 14:05关注
如果是printf,我可以告诉你,他是黑的,也就是;大小写不对
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥30 Matlab打开默认名称带有/的光谱数据
- ¥50 easyExcel模板 动态单元格合并列
- ¥15 res.rows如何取值使用
- ¥15 在odoo17开发环境中,怎么实现库存管理系统,或独立模块设计与AGV小车对接?开发方面应如何设计和开发?请详细解释MES或WMS在与AGV小车对接时需完成的设计和开发
- ¥15 CSP算法实现EEG特征提取,哪一步错了?
- ¥15 游戏盾如何溯源服务器真实ip?需要30个字。后面的字是凑数的
- ¥15 vue3前端取消收藏的不会引用collectId
- ¥15 delphi7 HMAC_SHA256方式加密
- ¥15 关于#qt#的问题:我想实现qcustomplot完成坐标轴
- ¥15 下列c语言代码为何输出了多余的空格