Skip to primary content
Skip to secondary content

C For Dummies Blog

Main menu

  • C For Dummies (home)
  • History
  • Series
  • Supplemental
  • Blog Miscellany

Category Archives: Solution

Post navigation

Newer posts →

Let’s Go Bowling – Solution

Posted on May 8, 2015 by dgookin
Reply

You may find my solution for this month’s Exercise to be more complex than necessary, but there’s a method to my madness.
Continue reading →

Posted in Solution | Leave a reply

Board of Chess – Solution

Posted on April 8, 2015 by dgookin
Reply

A chessboard is merely a two-dimensional array — a matrix — one where the rows and columns are the same size. As long as you can write code to output an 8-by-8 board, you can modify the code to reset the board’s size to any value.
Continue reading →

Posted in Solution | Leave a reply

Pattern Manipulation – Solution

Posted on March 8, 2015 by dgookin
3

This month’s Exercise was to create a cycle of numbers, values that repeat within a certain range. Of all the Exercises presented so far on this site, this one probably has the greatest number of solutions.
Continue reading →

Posted in Solution | 3 Replies

Round Numbers – Solution

Posted on February 8, 2015 by dgookin

This month’s Exercise required you to create three rounding functions: roundup(), rounddown(), and roundhalf(). Each one deals with a floating-point value in a specific way, but they all handle the basic rounding chore by typecasting a floating point variable to an integer.
Continue reading →

Posted in Solution

Just Average – Solution

Posted on January 8, 2015 by dgookin

If you attempted to compile the code skeleton for this month’s Exercise, you most likely stumbled across the first problem to solve: The average() function requires a type.
Continue reading →

Posted in Solution

Making Change – Solution

Posted on December 8, 2014 by dgookin

To solve this month’s Exercise you had to figure out a way to divvy up a dollar amount into the proper number of quarters, dimes, nickels, and pennies. As with many programming puzzles, a number of ways exist to code a solution. Click here to view mine.
Continue reading →

Posted in Solution

From Text to Integer – Solution

Posted on November 8, 2014 by dgookin

This month’s Exercise is to code a function that converts a string of text numbers into an integer value. If you used the skeleton provided, then your program’s output would look like this:

The string 24680 represents value 24680.

Continue reading →

Posted in Solution

The Inverse Pyramid – Solution

Posted on October 8, 2014 by dgookin

The task for this month’s Exercise was to create code that outputs an inverse number pyramid.

Here’s what such a thing looks like:

0000000000
999999999
88888888
7777777
666666
55555
4444
333
22
1

Continue reading →

Posted in Solution

Post navigation

Newer posts →

Recent Posts

  • C Blog 13th Anniversary
  • Colorful Data Chunks
  • A Little Bit Off the Sides – Solution
  • Working with Data Chunks
  • A Little Bit Off the Sides

Recent Comments

  • dgookin on C Blog 13th Anniversary
  • M.Stumpfl on C Blog 13th Anniversary
  • Chris Webb on C Blog 13th Anniversary
  • M.Stumpfl on A Little Bit Off the Sides – Solution
  • dgookin on A Little Bit Off the Sides – Solution

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 1997-2026 by QPBC.
All rights reserved

Proudly powered by WordPress