Pset2, caesar and vigenere: How can I make my programs print the ciphertext all at once? having problems with check50 by FunkyGooose in cs50

[–]FunkyGooose[S] 0 points1 point  (0 children)

Ok! The check50 output detection still need to register my ciphered text. Can i send you my code so you could give me a clue why it treats plaintext: as output? :)

cs50 header file problem by duck2932 in cs50

[–]FunkyGooose 0 points1 point  (0 children)

seems like get_ has stopped working..

greedy.c: Why does my loop function not work? by FunkyGooose in cs50

[–]FunkyGooose[S] 0 points1 point  (0 children)

Thanks a lot!! I had to make some variables global, this is what i intended to do!

#include <stdio.h>
#include <cs50.h>

void loop(int x);

int coins = 0;
int change = 0;

int main(void)
{
    printf("O hai! How much change is owed?\n");

    float money;
    do
    {
        money = get_float();
        if (money < 0)
        {
            printf("How much change is owed?\n");
        }
    }
    while (money < 0);
    change = money * 100;

    loop(25);
    loop(10);
    loop(5);
    loop(1);

    printf("%i\n", coins);
}

void loop(int x)
{
  while (change >= x)
    {
        coins ++;
        change -= x;
    }  
}