greedy (C)

Поделиться
HTML-код
  • Опубликовано: 16 янв 2025

Комментарии • 10

  • @johncerpa3782
    @johncerpa3782 8 лет назад +1

    Great video. I enjoy watching these videos :)

  • @whocares3337
    @whocares3337 4 года назад

    These videos are great but I lack one piece here: If you use the modulo , how lets say you have 111 cents - this should result in 4+1+1 =6 coins used change%25 will result in modulo of 11, but how do you change the coins counter variable? coins ++ will only do it once, while you used 4 coins wouldn't it?

  • @ed_tomeyan
    @ed_tomeyan 6 лет назад +2

    My code works with double, but it doesn't work with float.
    Works:
    double x;
    double round(double x);
    Doesn't work:
    float x;
    float roundf(float x);

    • @nitinhooda8945
      @nitinhooda8945 5 лет назад

      What does round do and also she in starting wrote quarter=25,then se is writing 0.25 what is that.can you please help me understand.

    • @emmetallen5685
      @emmetallen5685 5 лет назад

      Round is a function that rounds the float number given to a certain decimal point. You round the value given by the user and multipled by 100 to give a number that is as precise as possible.
      She is saying that whatever value you have, it needs to be able to either be equal to a quarter or greater than a quarter for the loop to work.

  • @aleksazlatkovic4663
    @aleksazlatkovic4663 2 года назад

    Wow, you rock.

  • @dexterwilliams4289
    @dexterwilliams4289 8 лет назад

    Blasian Family Channel brought me here.