cs50

    -2热度

    1回答

    以为我已经完成了凯撒,但运行CHeck50的时候,我的代码,因此失败:加密“barfoo”为“yxocll”采用23键 输出无效ASCII文本 登录 运行./caesar 23 ... 发送输入barfoo ... 检查输出 “密文:yxocll” ... 任何人都可以看到什么错我的代码?它似乎对大写字母很好,但小写字母和某些'键',我得到错误的结果,并不能找到原因。任何帮助将不胜感激。 例如:如

    -1热度

    1回答

    我的代码返回一个分段错误。我刚开始编写功能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

    0热度

    1回答

    问题是从.raw文件中恢复一些JPG文件。 当我运行check50我得到“恢复IMG不匹配”。 :) recover.c存在。 :) recover.c编译。 :)处理缺乏法医图像的 :(复苏000.jpg正确– 恢复的形象不符 :(恢复图像居中正确– 恢复的形象不符 :(复苏015.jpg正确– 015.jpg找不到 我真的很努力地找出问题所在,每次我找不到问题出在哪里,我希望有人可以和gi给我

    0热度

    1回答

    这是我的测试输出: :) 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.

    0热度

    1回答

    这是我对pset1贪婪的代码。现在,这一切都从我可以告诉和测试和使用CS50检查,以及... 问题是它被暗示在走过,我不得不查看如何正确使用圆,我可能应该使用模块化的地方?我知道它做了什么。例如10%3 = 1。是否值得再次使用模块化%进行操作。还有关于我的方法的任何建议?提前致谢。

    0热度

    1回答

    #define _CRT_SECURE_NO_WARNINGS #include "stdio.h" int main() { char name[100]; int key; printf("enter plaintext:\n"); fgets(name, 100, stdin); int length = sizeof(name);

    0热度

    1回答

    我开始进入c编程,并在cs50平台上进行了一系列讲座,由于我的互联网出现了一些问题,我决定下载这个库以便我可以在离线时下载问题集时有意义,下载后该库,并包含在项目中make命令不会在所有的工作给我这个输出 cc main.c -o main /tmp/ccz5QZev.o: In function main': main.c:(.text+0x18): undefined reference to

    -1热度

    1回答

    我有在pset5一些麻烦 负荷的,其实我不知道如何开始调试,我看过的教训了几次,现在我不会在任何地方得到.. 当我运行speller.c它给我一个赛格故障,我跑调试器,它崩溃的For循环的beggining,这里如下我的代码: #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <ctype.h> #in

    3热度

    7回答

    #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

    -8热度

    4回答

    我从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); }