Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Exercism

C++

via Exercism

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
C++ (pronounced cee plus plus) is a general purpose programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. It is immensely popular, particularly for applications that require speed and/or access to some low-level features. It is considered to be an intermediate level language, as it encapsulates both high and low level language features.

Syllabus

  • Hello World
    • Exercism's classic introductory exercise. Just say "Hello, World!".
  • Log Levels
    • Learn about strings by parsing logs.
  • Lasagna
    • Learn the basics of C++ by cooking lasagna
  • Freelancer Rates
    • Learn about integers and floating point numbers by helping a freelancer communicate with a project manager about billing.
  • Last Will
    • Learn about namespaces by executing an estate.
  • Pacman Rules
    • Learn about booleans by implementing the rules of the Pac-Man game.
  • Vehicle Purchase
    • Learn about comparisons and if-statements while preparing for your next vehicle purchase
  • Making the Grade
    • Learn about arrays and vectors by grading and organizing your students exam scores.
  • Interest is interesting
    • Learn about loops by adding interest to savings accounts.
  • Ellen's Alien Game
    • Learn about classes by creating an Alien for Ellen's game.
  • Election Day
    • Learn about references by creating a simple voting system.
  • Troll the Trolls
    • Learn about enumerations and switch statements by checking permissions of user accounts.
  • Doctor Data
    • Learn about header files by recovering data.
  • lasagna-master
    • Dive deeper into C++ functions while preparing to cook the perfect lasagna.
  • Power of Troy
    • Learn about smart pointers by using magic and artifacts in the world of Troy.
  • Speedywagon Foundation
    • Learn about pointers by writing wrappers for an old library.
  • Leap
    • Determine whether a given year is a leap year.
  • Reverse String
    • Reverse a given string.
  • Space Age
    • Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
  • Triangle
    • Determine if a triangle is equilateral, isosceles, or scalene.
  • Grains
    • Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
  • Raindrops
    • Convert a number into its corresponding raindrop sounds - Pling, Plang and Plong.
  • Pangram
    • Determine if a sentence is a pangram.
  • Two-Fer
    • Create a sentence of the form "One for X, one for me.".
  • Grade School
    • Given students' names along with the grade that they are in, create a roster for the school.
  • Hamming
    • Calculate the Hamming distance between two DNA strands.
  • Nucleotide Count
    • Given a DNA string, compute how many times each nucleotide occurs in the string.
  • RNA Transcription
    • Given a DNA strand, return its RNA complement.
  • Collatz Conjecture
    • Calculate the number of steps to reach 1 using the Collatz conjecture.
  • Difference of Squares
    • Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
  • Nth Prime
    • Given a number n, determine what the nth prime is.
  • Queen Attack
    • Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.
  • Sieve
    • Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.
  • Say
    • Given a number from 0 to 999,999,999,999, spell out that number in English.
  • Gigasecond
    • Given a moment, determine the moment that would be after a gigasecond has passed.
  • Secret Handshake
    • Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
  • Allergies
    • Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
  • Protein Translation
    • Translate RNA sequences into proteins.
  • Sum of Multiples
    • Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
  • Prime Factors
    • Compute the prime factors of a given natural number.
  • Robot Name
    • Manage robot factory settings.
  • Clock
    • Implement a clock that handles times without dates.
  • Meetup
    • Calculate the date of meetups.
  • Beer Song
    • Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.
  • Atbash Cipher
    • Create an implementation of the Atbash cipher, an ancient encryption system created in the Middle East.
  • Trinary
    • Convert a trinary number, represented as a string (e.g. '102012'), to its decimal equivalent using first principles.
  • Binary Search
    • Implement a binary search algorithm.
  • Phone Number
    • Clean up user-entered phone numbers so that they can be sent SMS messages.
  • Series
    • Given a string of digits, output all the contiguous substrings of length `n` in that string.
  • Complex Numbers
    • Implement complex numbers.
  • Food Chain
    • Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.
  • Roman Numerals
    • Convert modern Arabic numbers into Roman numerals.
  • Bob
    • Bob is a lackadaisical teenager. In conversation, his responses are very limited.
  • Word Count
    • Given a phrase, count the occurrences of each word in that phrase.
  • Circular Buffer
    • A data structure that uses a single, fixed-size buffer as if it were connected end-to-end.
  • Crypto Square
    • Implement the classic method for composing secret messages called a square code.
  • ETL
    • Change the data format for scoring a game to more easily add other languages.
  • Matching Brackets
    • Make sure the brackets and braces all match.
  • Anagram
    • Given a word and a list of possible anagrams, select the correct sublist.
  • Binary Search Tree
    • Insert and search for numbers in a binary tree.
  • Luhn
    • Given a number determine whether or not it is valid per the Luhn formula.
  • Acronym
    • Convert a long phrase to its acronym.
  • Armstrong Numbers
    • Determine if a number is an Armstrong number.
  • Binary
    • Convert a binary number, represented as a string (e.g. '101010'), to its decimal equivalent using first principles.
  • Hexadecimal
    • Convert a hexadecimal number, represented as a string (e.g. "10af8c"), to its decimal equivalent using first principles (i.e. no, you may not use built-in or external libraries to accomplish the conversion).
  • Isogram
    • Determine if a word or phrase is an isogram.
  • Pascal's Triangle
    • Compute Pascal's triangle up to a given number of rows.
  • Perfect Numbers
    • Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.
  • Scrabble Score
    • Given a word, compute the Scrabble score for that word.
  • All Your Base
    • Convert a number, represented as a sequence of digits in one base, to any other base.
  • Robot Simulator
    • Write a robot simulator.
  • Bank Account
    • Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!
  • Darts
    • Calculate the points scored in a single toss of a Darts game.
  • Largest Series Product
    • Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.
  • ISBN Verifier
    • Check if a given string is a valid ISBN-10 number.
  • Linked List
    • Implement a doubly linked list.
  • Simple Linked List
    • Write a simple linked list implementation that uses Elements and a List.
  • High Scores
    • Manage a player's High Score list.
  • Eliud's Eggs
    • Help Eliud count the number of eggs in her chicken coop by counting the number of 1 bits in a binary representation.
  • Diamond
    • Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.
  • Run-Length Encoding
    • Implement run-length encoding and decoding.
  • Rotational Cipher
    • Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
  • Resistor Color
    • Convert a resistor band's color to its numeric representation.
  • Resistor Color Duo
    • Convert color codes, as used on resistors, to a numeric value.
  • Flower Field
    • Mark all the flowers in a garden.
  • Sublist
    • Write a function to determine if a list is a sublist of another list.
  • Zebra Puzzle
    • Solve the zebra puzzle.
  • List Ops
    • Implement basic list operations.
  • Knapsack
    • Given a knapsack that can only carry a certain weight, determine which items to put in the knapsack in order to maximize their combined value.
  • Two Bucket
    • Given two buckets of different size, demonstrate how to measure an exact number of liters.
  • Yacht
    • Score a single throw of dice in the game Yacht.
  • Kindergarten Garden
    • Given a diagram, determine which plants each child in the kindergarten class is responsible for.
  • D&D Character
    • Randomly generate Dungeons & Dragons characters.
  • Spiral Matrix
    • Given the size, return a square matrix of numbers in spiral order.
  • Parallel Letter Frequency
    • Count the frequency of letters in texts using parallel computation.
  • Pig Latin
    • Implement a program that translates from English to Pig Latin.
  • Rail Fence Cipher
    • Implement encoding and decoding for the rail fence cipher.
  • Affine Cipher
    • Create an implementation of the Affine cipher, an ancient encryption algorithm from the Middle East.
  • Alphametics
    • Given an alphametics puzzle, find the correct solution.
  • Twelve Days
    • Output the lyrics to 'The Twelve Days of Christmas'.

Reviews

Start your review of C++

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.