Category Archives: Basic

C++ || Snippet – How To Display The Current Working Directory

The following is sample code which demonstrates how to display the current working directory of the program when its properties were initialized. If you are

C++ || Snippet – How To Convert A Decimal Number Into Binary

This page will demonstrate how to convert a decimal number (i.e a whole number) into its binary equivalent. So for example, if the decimal number

C++ || Convert Numbers To Words Using A Switch Statement

This program demonstrates more practice using arrays and switch statements. REQUIRED KNOWLEDGE FOR THIS PROGRAM Integer Arrays Cin.get Isdigit For loops While Loops Switch Statements

C++ || Char Array – Palindrome Number Checker Using A Character Array, Strlen, Strcpy, & Strcmp

The following is a palindromic number checking program, which demonstrates more use of character array’s, Strlen, & Strcmp. Want sample code for a palindrome checker

C++ || Convert Time From Seconds Into Hours, Min, Sec Format

Here is another simple programming assignment. This page will demonstrate how to convert time from -seconds- into HH::MM::SS (hours, minutes seconds) format. So for example,

C++ || Char Array – Determine If A String Is A Number Or Not

The following is another intermediate homework assignment which was presented in a C++ programming course. This program was assigned to introduce more practice using and

C++ || Snippet – Round A Number To The Nearest Whole Number

This page will display a simple implementation of a function which rounds a floating point number to the nearest whole number. So for example, if

C++ || Snippet – How To Find The Minimum & Maximum Of 3 Numbers, Print In Ascending Order

This page will demonstrate how to find the minimum and maximum of 3 numbers. After the maximum and minimum numbers are obtained, the 3 numbers

C++ || Snippet – How To Read & Write Data From A User Specified Text File

This page will consist of a demonstration of a simple quadratic formula program, which highlights the use of the input/output mechanisms of manipulating a text

C++ || Printing Various Patterns Using Nested Loops

This page will demonstrate various programs which illustrates the use of nested loops to print selected patterns to the screen. REQUIRED KNOWLEDGE FOR THIS PAGE

C++ || Savings Account Balance – Calculate The Balance Of A Savings Account At The End Of A Period

Here is another actual homework assignment which was presented in an intro to programming class. The following program was a question taken from the book

C++ || Snippet – How To Reverse An Integer Using Modulus & While Loop

This page will consist of a simple program which demonstrates how to reverse an integer (not an int array) using modulus and a while loop.

C++ || Cash Register Simulation – Display The Total Sales Amount In Dollars & Cents Using Modulus

The following is a simple program which demonstrates more use of the modulus (%) function to manipulate integer data. REQUIRED KNOWLEDGE FOR THIS PROGRAM Modulus

C++ || Char Array – Palindrome Checker Using A Character Array, ToUpper, Strlen, Strcpy, & Strcmp

The following is a palindrome checking program, which demonstrates more use of char array’s, ToUpper, Strlen, & Strcmp. REQUIRED KNOWLEDGE FOR THIS PROGRAM Character Arrays