Purchase Solution

3 C++ Programs !

Not what you're looking for?

Ask Custom Question

L. Create a program to determine the smallest number out of 15 numbers entered (numbers entered one at a time from the keyboard). This should be done in prototype:
double smaller (double x, double y);
Make sure you use a for loop expression inside your function. Be sure to include your program prompts for input and a display of the smallest number when you have found it.

2. You are a mortgage broker who is determining whether you should provide a mortgage to
perspective home purchasers. If you are willing to provide a mortgage, you need to
decide how much you should charge the borrower. You design a point system that
assigns perspective borrowers a score of 1,2,3,4, or 5 based on some mysterious
formula. Based on these scores, you come up with the following decisions:
Score Decision
5 Provide mortgage at 5% interest rate
4 Provide mortgage at 6% interest rate
3 Provide mortgage at 7% interest rate
2 Do not provide mortgage
1 Do not provide mortgage

Create a program that takes the scores as input and provides as output the management
decision. In the program, include 2 void functions titled getScore and printdecision,
each with an int argument.

? The function getScore should have a Reference parameter that gets the score in
getScore and then passes the value back to be printed in main (), and
? print Decision should have a Value parameter.

The function getScore will prompt the user for the integer score from 1 to 5, get the input
from the user, and display the input received on the screen. The function printDecision
will determine the mortgage decision and print the decision. (Be careful and note that
this problem requires you to input the score into getScore and not directly into the main
function.)

3. Define a class called Date that has 3private members that represent the month, day, and year respectively. They will be represented as integers. Include a constructor and a public void function called print that prints out the date. (For example, if the month is 2, the day is 25, and the year is 1946, print provides as output 2/25/1946.) Include the class in a program that prints out the date 2/25/1946.

Purchase this Solution

Solution Summary

The programs are properly commented to make it easier for you to understand !

Solution Preview

Dear student,

Please find the programs attached with the post. As always, I have tried to write ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Javscript Basics

Quiz on basics of javascript programming language.

C++ Operators

This quiz tests a student's knowledge about C++ operators.