Program to determine the smallest number out of 15 numbers

Assignment Help C/C++ Programming
Reference no: EM13936957

1. 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

1 Provide mortgage at 5% interest rate

2 Provide mortgage at 6% interest rate

3 Provide mortgage at 7% interest rate

4 Do not provide mortgage

5 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.

Reference no: EM13936957

Questions Cloud

What are your preliminary results from initial runs : Results and Robustness Check- What are your preliminary results from initial runs in the statistical software? What is their relationship with the original hypotheses and research questions
Should carmody implement the new design : Should Carmody implement the new design? What non-financial and qualitative factors should Carmody consider in deciding whether to implement the new design?
Large consulting firm and specialise : You are a strategic analyst for a large consulting firm and specialise in the analysis of Australian companies. You have been asked by your manager to write a report analysing an Australian company's underlying strategy that has resulted in it mov..
Presence of chloroplasts and mitochondria in eukaryotic cell : An outline of the theory of endosymbiosis with a discussion as to what extent the theory can be used to account for the presence of chloroplasts and mitochondria in eukaryotic cells. The advantages in evolutionary terms of plant cells to possess b..
Program to determine the smallest number out of 15 numbers : 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
Details of your personal consumer behaviour journal : This section of the report combines the details of your personal Consumer Behaviour Journal AND Consumer Behaviour theory. You will need to choose one theory from the list below to explain in your report:
Describe the enterprise, in terms of its operations : Illustrate how its e-commerce or ERP implementation integrated with related ICT (information and communication technologies- data mining, business intelligences, data ware house, databases, internet, RFID, VAN, EDI) ?
How are the forces that produce differences in wealth : The theory of natural selection has been applied to human culture in many different realms. For instance, there is a general belief in the United States that survival of the fittest determines which people are rich and which people are poor.
How to motivate workers to improve their productivity : Autronic is considering how to motivate workers to improve their productivity. One proposal is to evaluate and compensate workers in the Manufacturing and Installation Departments on the basis of their productivities.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program that generates a new list

Given a list listA of numbers, write a program that generates a new list listB with the same number of elements as listA, such that each element in the new list is the average of its neighbors and itself in the original list. For example, if listA..

  Define the operations using peano arithmetic

Write five tests for each using numbers larger than 100 and verify using natZint and intZnat that your numbers work the same way as the usual natural numbers.

  Prepare a program to palindrome function.

A palindrome is a string whose reversal is identical to the original string.  How many strings using decimal digits (0,1,2,.....,9) of length n are palindromes?

  Design an algorithm to assign costs to seats.

Implement a simple seat reservation system for a theater in C++. The seats in the theater will be represented with a two dimensional array. The closer the seats are to the stage, the more expensive the seats are. Moreover, within a row, the seats ..

  Implement a class timedepositaccount

It is not possible to deposit additional funds into this account. Provide a withdraw method that removes the entire balance. Partial withdrawals are not allowed.

  Program that generates 50 random numbers of type

Write a program that generates 50 random numbers of type integer ranges from 1 to 1000 and load all the numbers into a C++ vector. The program should then display the largest, the smallest, the sum, and the average values stored in the vector.

  Program to input the length of the side from the keyboard

write a program to input the length of the side from the keyboard ,use the class to obtain the areas of all shapes and display the results on the screen

  Write a pseudo code and perform algorithm analysis

Write a pseudo code and perform algorithm analysis to show the complexity is Log N - Suppose that you have an N-story building and plenty of eggs.

  Branching statements to control the flow of a program

The purpose of this exercise is to give you an opportunity to practice using cin to handle user keyboard inputs, use branching statements to control the flow of a program, and work on your C++ programming style

  Implement function types that takes no input

Implement function types that takes no input, declares 3 variables of type char, 3 of type short, 3 of type int, and 3 of type double.

  Compare the running time of two versions of the insertion

implement Uniform Random Number generator and Generate 1000 Random number between 0 an 10000. Try to use insertion sort to sort them. Compare the running time of two versions of the insertion sort.

  Program that prints the statement

Write a program that prints the statement "Learning new topics is Fun!" in a function called writeThoughts that is called by the main function.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd