Client Login Register
Calculate Price & Order →
← Back to all articles

creating a program in C++ visual studios.

Published on December 02, 2026 • Category: Academic
creating a program in C++ visual studios.

creating a program in C++ visual studios.

//Author: (your name)

//CPSC 120 Lab 1

//1/22/2017

#include <iostream>

using namespace std;//So you don’t need to use “std::”

int main()

{

std::cout << “Hello, world!n”;

system(“PAUSE”);

return 0;

}

Note the header above

Making Change

Create a program that:

  1. Asks the user to input a number of cents

  2. Calculates and displays the number of quarters, dimes, nickels, and pennies that should be used to reach the value. EX: 67 cents would be 2 quarters, 1 dime, 1 nickel, and 2 pennies

  3. Calculates and display the total number of coins to be given back

Hint: The simplest way to solve this involves using the division (/) operator and modulus (%) operator.




Share

We only email you; unsubscribe in one click. No address is ever sold.

Ask about study support 💬 WhatsApp 📞

Just now