Block of Code

Practical Examples for Programmers

  • Home
  • C++
  • Java
  • Visual Basic
  • Discrete Math
  • Ask a Question

C++

Basic Input / Output

Four Digits: Prompt the user to enter a positive integer and output the digits individually.
Summer Job: Calculate a students budget from a summer job.
Ton of Rice: Calculate the number of bags of rice in one ton.
Store Profit: Determine markups, taxes and final prices in a retail store.
Quarters, Dimes and Nickels: Add the value of coins and output the total value.
Pay Increase: Read employee data from a text file, adjust their wages, and write the data back to a text file.

Selection

Calculator: Mimics the behavior of a simple calculator.

Repetition

Functions

Namespaces

Strings

Arrays

Structs

Classes

Inheritance

Composition

Pointers

Virtual Functions

Overloading

Templates

Exception Handling

Recursion

Searching

Sorting

Vectors

Stacks

Queues

Trees

Secondary Sidebar

This is the secondary sidebar

Copyright © 2025 · Metro Pro Theme on Genesis Framework · WordPress · Log in