我的代码返回一个分段错误。我刚开始编写功能init和draw。 它是用C编写的,来自cs50的东西。 这是我的代码: /**
* fifteen.c
*
* Implements Game of Fifteen (generalized to d x d).
*
* Usage: fifteen d
*
* whereby the board's dimensions are to
这是我的测试输出: :) greedy exists
:) greedy compiles
:(input of 0.41 yields output of 4
expected "4\n", not "3\n"
:(input of 0.01 yields output of 1
expected "1\n", not "0\n"
:) input of 0.
我开始进入c编程,并在cs50平台上进行了一系列讲座,由于我的互联网出现了一些问题,我决定下载这个库以便我可以在离线时下载问题集时有意义,下载后该库,并包含在项目中make命令不会在所有的工作给我这个输出 cc main.c -o main /tmp/ccz5QZev.o: In function main': main.c:(.text+0x18): undefined reference to
#include <cs50.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
//ask user for input
string s = get_string();
//make sure get_string() returned a string
if(s != NUL
我从CS50学习C语言。当我运行我的代码时,它说'有符号整数溢出'。 #include <stdio.h>
#include <cs50.h>
int main(void)
{
int x = 41;
int c = 0;
while(x>=25)
{
c = c+1;
}
printf("%i\n", c);
}