吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 900|回复: 4
收起左侧

[求助] vscode报错,c语言

[复制链接]
djdgf4 发表于 2022-3-10 19:12
不论开哪个文件,都显示这样的错误
ld returned 1 exit status

已经检查了main函数没错,也没有打开其他的任务,不知道为什么一直有这个错误
image.png
image.png

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

only998 发表于 2022-3-10 22:55
编译失败,不能打开输出文件 xxxxx.exe:拒绝访问   
检查你的vsc权限和minGW权限
sololau00 发表于 2022-3-10 23:27
demo_plus 发表于 2022-3-10 23:39
#include <stdio.h>


int main() {
       
        int score;
        char ch1 = 'A', ch2 = 'B', ch3 = 'C', ch4 = 'D', ch5 = 'E';
        scanf("%d", &score);
        if (score >= 90)
                printf("%c", ch1);
        else if (score >= 80 && score < 90)
                printf("%c", ch2);
        else if (score >= 70 && score < 80)
                printf("%c", ch3);
        else if (score >= 60 && score < 70)
                printf("%c", ch4);
        else
                printf("%c", ch5);

        return 0;
}




#include <stdio.h>
#include <math.h>


int main() {

        float a, b, c;
        float area;
        float s;

        scanf("%f,%f,%f", &a, &b, &c);  // 输入时需要用逗号分割。比如3,4,5回车
        // scanf("%f%f%f", &a, &b, &c);  // 输入时用空格或回车分割。比如3 4 5回车
        s = (a + b + c) / 2;
        area = sqrt(s * (s - a) * (s - b) * (s - c));

        printf("三角形面积:%.0f\n", area);

        return 0;
}
ForeUP 发表于 2022-3-16 17:11
楼上代码编译应该可以通过,题主的代码有语法错误
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-29 03:14

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表