gpt4 book ai didi

c - Dev C 不断返回错误值

转载 作者:行者123 更新时间:2023-11-30 21:17:12 26 4
gpt4 key购买 nike

#include <stdio.h> 
#include <stdlib.h>
main()
{
int n;
printf("Introduce un número entero\n");

scanf("%d", &n);
printf("Has introducido el número: %d", &n);
}

每次我运行这个 C 代码时,n 都会得到 6487628,我一遍又一遍地卸载并安装它,它一直这样,我不知道还能做什么。

最佳答案

您不需要 printf() 中的 &n,您需要 n。您正在显示存储位置 n 存储在

关于c - Dev C 不断返回错误值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45949784/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com