Questions tagged [output]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
34 views

pset2 Vigenere - output overwriting “ciphertext”

I'm stuck (apologies if I just didn't find the answer to this - I did read a number of answers and didn't see a solution to this problem). I have a line in my code to print "ciphertext:" before the ...
0
votes
1answer
66 views

Error: greedy cash input of 0.41 yields output of 4

I'm getting an error and I can't figure out the solution to this problem. I get an error at check cs50: "input of 0.41 yields output of 4; expected "4\n", not "You typed: 0.41..." Here is my code: #...
0
votes
1answer
259 views

pset4 resize less output issues

Have been trying to figure out what's wrong with my code, but having issues with it. Can someone please point me in the right direction? What I'm getting with check50 :) resize.c and bmp.h exist. ...
0
votes
1answer
561 views

Speller seems to be working but fails check50. (PSET5)

so currently my speller seems to be working, it matches the staff solution with the austinpowers.txt (correctly identifies that 644 words have been misspelled & works when using a small dictionary ...
0
votes
1answer
36 views

vigenere output

Ok. I've been working on this for two days now and have checked various types of answers on here, but I'm not sure what's wrong with my code. I think maybe I need a fresh pair of eyes, or my equation ...
0
votes
1answer
54 views

vigenere - getting too many letters as output

I was able to complete my code and it works when I "make Vigenere" however for some reason, it is outputting double the amount of letters than the plaintext. I figure it has something to do with my ...
0
votes
1answer
53 views

Question about Pset2 Caesar Code issue

#include <stdio.h> #include <cs50.h> #include <string.h> int main(int argc, string argv[]) { if (argc != 2) { printf("Please enter 1 additional numeric Command-Line argument!\n"...
0
votes
1answer
62 views

PSet2 Caesar Program: Single Unexpected Output (Otherwise working)

I am finishing the Caesar program in Problem Set 2 and, most of the time, my code works as intended - enciphering the user's input by incrementing each character by the integer entered at the command ...
3
votes
1answer
138 views

My output for greedy.c is correct when I check it manually but not when I check it using check50

It says that ' input of 4.2 yields output of 18 \ expected output, but not "18" '. What is the difference between 18 and "18" ?! Here is my code: #include <stdio.h> #include <cs50.h> ...
1
vote
1answer
126 views

Questions: Is my small.bmp corrupted?/ How do I read the rgb values of each pixel from the ready outfile?

So this should be a little complex of questions. 1. I want to ask if my small.bmp file looks normal: I looked at it with the command "xxd -c 12 -g 3 -s 54 small.bmp" and the output was the same as ...
0
votes
1answer
34 views

resize.c outputting transparent image

Can someone please help me figure out what I am doing wrong here? My program outputs a transparent image, but the image is the correct size. (For example: input image is 4x4 output image is 8x8 but ...
0
votes
1answer
220 views

greedy failing input of 4.2 even though it's outputing the correctly formatted answer!

#include <cs50.h> #include <stdio.h> #include <math.h> int main(void) { float n; //gets amount of change from user do { printf ("How much change is their?\n"); n ...
0
votes
1answer
26 views

Encrypted text doesn't appear on screen

I have re-checked it many times but the output doesn't print on screen. Kindly help!
0
votes
1answer
64 views

what does this error mean in cs50 check? how can I meet the cs50's output requirement?

:) greedy.c exists :) greedy.c compiles :( input of 0.41 yields output of 4 \ expected output, but not "4" :( input of 0.01 yields output of 1 \ expected output, but not "1" :( input of 0.15 yields ...
0
votes
2answers
88 views

Vigenere modulo not working

I am trying to make this output a character encrypted with a key(which is an int) it just outputs some numbers or something. printf("%c", (((p[i] - 65) + (k[j] - 65)) % 26) + 65;);
0
votes
1answer
29 views

Greedy outputting 0 or 102394023940

I thought I wrote code that would work for greedy in pset1, but every time I run the program, it either outputs 0 or some super large number. What is the problem? #include<stdio.h> #include<...
0
votes
1answer
1k views

Help with fseek and fgets

I am trying to fully grasp how these functions work. From the Reference50 website: fseek FILE* out = fopen("out.txt", "w+"); fputs("Team Bowden Fever!", out); char buffer[50]; fseek(out, 0, ...
0
votes
1answer
228 views

c prog - Generate ''ALPHABET'' and ''alphabet'' in arrays, wrong output

I'm trying to generate two independent characters arrays. The first one must contain the alphabet in lowercase and the second one, in uppercase. My code works but in the second case, the output ...
0
votes
1answer
52 views

Greedy not printing

So when I run my code it asks for the amount but then it doesn't print the number of coins... Help! #include <stdio.h> #include <cs50.h> #include <math.h> int main(void) { /* ...
0
votes
1answer
384 views

What's the problem with my vigenere?

I have tried everything and I've been with this for one and a half months. what is the problem? When I run it, it outputs some characters correctly, but others not. I think the problem is with the ...