/Practice

Small practice projects (hello world, euler, fibonacci, gcd & lcm)

Primary LanguageC++

Practice

Small practice projects (executable excluded)

  • hello.cc
    • first ever program!!
    • simple cout statement
  • euler.cc
    • refresher on for loops and mod operator symbol %
    • add up numbers 0 to 1000 that are divisible by 3 or 5
  • fibonacci_sequence.cc
    • find the first few terms of the fibonacci sequence
    • using two different methods (array & rolling variables)
  • gcd_and_lcm.cc
    • find the greatest common divisor and least common multiple of two numbers