Create a program that accepts numbers of pennies to make change for 387
dollars= 3
quarters=3
dimes=1
nickels=0
pennies=2
A perfect number is an integer that is equal to the sum of its factors. For example, 6 is a perfect number as 6 = 3+2+1. Write down a program that takes an integer x as an input and prints all perfect numbers from 1 to x.
Using Code block, create an executable C++ program for Library management system
Company pays its employees based on a commission of the sales they make as shown below, Monthly Sales Commission Rate:
First 50,000 = 10%, Next 100,000 = 15%, Next 200,000 = 20%, Above 350,000 = 25%. Additionally, all employees are entitled to a commission of 20,000 per month.
Write a C++ program that allows you to input an employee’s monthly sales, computes the commission due to the employee and displays it.
A student did 8 units in an exam and got different marks in each of the exam papers. He intends to calculate his total, mean score and exams decision for the exams using a program written in C++.
1. Assign 8 scores to the student in a one-dimensional array.
2. Declare a function that takes an array of the student’s scores as a parameter and calculates both the total and the mean score.
3. Pass the mean score from (2) above into another function by reference, that computes whether the student has passed or not given that a pass is 50 – 100 while a fail is 0 – 49.99
Write a C++ program that will compute the above.
define a class called vehicle that will store two items of information about a vehicle: the fuel capacity and the fuel consumption in kilometers per litre and prototype of four functions a default constructor and a parameterized constructor that initializes the taxi fuel capacity to 20 litres and taxi consumption to 10 kpl , a destructor and a friend function that uses the values from the constructors to calculates the taxi range (the maximum distance it would travel if its fuel tank is full without refueling) nb. show only the prototype of the function in the class
How many zeroes are there after the last non-zero digit of a million? a trillion? To easily identify that, let us make a program to count and print the number of zeroes after the last non-zero digit of a number. For example, in 20400, there are 2 zeroes after the last non-zero digit of the number, 4. Are you up for this challenge?
Remember the game of FizzBuzz from the last time? Well, I thought of some changes in the game, and also with the help of loops as well. Firstly, you'll be asking for a random integer and then loop from 1 until that integer. Then, implement these conditions in the game:
Imagine a publishing company that markets both book and audiocassette versions of its works Create a class publication that stores the title (a string) and price (type float) of a publication from this class derive twn classet book, which adds a page count (type int), and tape, which adds a playing time in minutes (type float) Each of these three classes should have a getdatall function to get its data from the user at the keyboard, and a pudota) function to display its data.
WAP to create two different files name like roll and name of at least 5 students and print all on screen.