sách gpt4 ăn đã đi

C 语言 我的代码中出现错误

In lại Tác giả: Walker 123 更新时间:2023-11-30 20:05:05 33 4
mua khóa gpt4 giày nike

你好,我正在寻找我哪里做错了?

#include 
#include

int main(int argc, char *argv[])
{
int account_on_the_bank=25;
printf("how much money do you have in the banque? \n");
scanf("%f",account_on_the_bank);
printf("Vous avez %d euros sur votre compte",account_on_the_bank);
trả về 0;
}

我的问题出在哪里???它显示 Windows 已停止工作我已经尝试了一切,总是出现同样的问题?

câu trả lời hay nhất

这是有问题的行:

    scanf("%f",account_on_the_bank);

它有错误的说明符,也没有将变量的地址传递给 scanf。

应该是:

    scanf("%d", &account_on_the_bank);

关于C 语言 我的代码中出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33718339/

33 4 0
Walker 123
Hồ sơ

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá taxi Didi miễn phí
Phiếu giảm giá taxi Didi
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress