cs50

    -2热度

    1回答

    当我运行make时,我得到一个没有文件类型的文件。有没有办法创建一个.exe文件,我可以在Windows中单击运行? 我安装我的主目录: sudo apt-get install mingw-w64 但是当我从〜/工作区运行/ pset2 /的V @ genere: i686-w64-mingw32-gcc -o vigenere.exe vigenere.c 我得到: vigenere.

    0热度

    1回答

    当我使用数字4-22时,输出不可靠,我不知道为什么。帮助将不胜感激,我也想知道为什么这不起作用。 #include<cs50.h> #include<stdio.h> #include<string.h> int main(void) { int shifts; int enc; printf("What is your message "); st

    -1热度

    1回答

    我的Vigenere密码有问题。当我输入我的消息时,结果会很好,但如果字母经过'z',它不会循环回'a',并且正在打印其他ascii字符。而且,当我把信息放进去的时候,我有时会得到比我需要的更多的字符。例如:关键是你好,消息是mmmmm(我知道,没有太多的消息,但它是一个例子),输出是tqxx {{。请帮忙!!!! #include<cs50.h> #include<stdio.h> #inc

    0热度

    1回答

    我遇到了CS50 IDE的严重问题。我昨天做的每件事似乎都没有在今天工作。我正在编译文件,但现在无法让它们运行,因为我得到错误“bash:./:是一个目录”。 以下是错误的截图: 这里是我的文件夹结构

    0热度

    2回答

    #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <crypt.h> int main(int argc, string argv[]) { if(argc > 2){ printf("too many arguments\n"); return 51;

    2热度

    2回答

    所以我有我为CS50 pset1马里奥问题创建的代码。代码行为正确,并且正在做它应该做的事情,但我不明白其中的一个部分。它为什么这样表现。 这里是我写在C代码: #include <cs50.h> #include <stdio.h> int main (void){ int height, row, space, hash; do { printf("Height

    2热度

    2回答

    我正在处理CS50的情感挑战,我想用颜色使用Termcolor和占位符在控制台中打印,但我遇到了一些问题。 这是我的代码: if score > 0: green = lambda x: colored(x, 'green') print(green("1 ", tweets)) elif score < 0: red = lambda x: colo

    -3热度

    2回答

    该代码假设打印用户的姓名缩写,但代码有一个错误,而是用每个字母之间的空格打印出整个名称。我知道错误在于for循环,但我不知道如何调试此问题。建议? int main(void) { printf("Enter full name: "); string name = get_string(); { printf("%c", toupper(name[0]));

    1热度

    1回答

    我花了几个小时,我仍然卡住了。当我做检查时,我得到以下输出。这些错误与我打印出来的方式有关吗? :) vigenere.c存在 :) vigenere.c编译 :(加密 “一” 为 “A” 使用 “a” 作为关键字 \预期的输出,而不是“密文:一个\u0004ù\u001bÿ\ n “个使用 ”巴兹” :)加密 “barfoo” 为“ caqgon” 作为关键字 :)加密 “baRFoo” 为 “

    -2热度

    1回答

    在PSET 5S演练中,节点结构的定义如下: typedef struct node { int value; struct node* next } node; node* head = malloc(sizeof(node)); cursor = head; //update the cursor cursor->next 当我们然后使用光标 - >下一条语