What are the two floating point types in cpp

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

Part 1: Your city's parking violation bureau wants you to write a program to compute fines for parking violations There are four types of violation: type A carries a fine of $10, type B carries a fine of S20, type C carries a fine of S30, and type D carries a fine of $50.The program should ask for the number of type A violations, the number of type B violations, and so on. The program should display the total fine for the person.

Part 2: Write a program that asks the user to enter a student's grades on four exams. The program should display the four grades and the average of the four grades, rounded to the nearest tenth. To add the grades, use a variable called total_grade, which you should initialize to zero. As the program prompts for and obtains each grade, add the grade to total_grade using the += operator.

REVIEW EXERCISES

1. What are the two floating point types in C++ and how do they differ?
2. How can you use the setprecision() and setiosflags() manipulators to control the output of decimal numbers?
3. Explain how C++ handles an arithmetic expression that contains different numeric data types.
4. What is a type cast and how do you make one? Why is a type cast sometimes necessary?
5. How are data types converted across the assignment operator?
6. What is the value of an assignment expression?
7. Explain how a multiple assignment works
8. What are the compound assignment operators and how do they work?
9. What are the increment and decrement operators and how do they work?
10. What is the difference between pre- and postincrement?

Text Book: C++ For Business Programming Second Edition John C Mulluzzo.

Reference no: EM131132079

Questions Cloud

Define dummy variable and give two examples : Define dummy variable and give two examples. Analyze the three different types of data (cross-sectional, time series, panel data)
Design a gui program to find weighted average of four test : Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are given in the following format.
Describe the nondisclosure parameters of this agreement : Identify how these parameters could help safeguard your organization (Caterpillar, Inc.) from the intentional and/or unintentional dissemination of trade secrets by senior executives.
What will carol’s profit be on the stock transaction : What will Carol’s profit be on the stock transaction if its price does rise to $70 and she sells? How much will Carol earn on the option transaction if the underlying stock price rises to $70? How high must the stock price rise for Carol to break eve..
What are the two floating point types in cpp : What are the two floating point types in C++ and how do they differ? How can you use the setprecision() and setiosflags() manipulators to control the output of decimal numbers?
Determine the amount of profit or loss an investor : For each of the 100-share options shown in the following table, use the underlying stock price at expiration and other information to determine the amount of profit or loss an investor would have had, ignoring brokeragefees.
Which type of forecasting tool seemed more appropriate : Which type of forecasting tool seemed more appropriate for the organization you selected-a qualitative or quantitative tool? Why? What do you see as the advantages and disadvantages of each in this specific organizational setting?
Review the assignment reflective journal : Review the Assignment.- Assignment: Reflective Journal - and also check it for flow, citations and referencing?
Were the disney teases of aircraft to united airlines operat : Were the Disney teases of aircraft to United Airlines operating leases or financial lenses?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  State diagram to recognize one form

Design a state diagram to recognize one form of the comments of the C-based programming languages, those that begin with /* and end with */. and also Write and test the code to implement the state diagram.

  Prepare a program to show the fibonacci numbers

Write a C++ program to display first 20 Fibonacci numbers in descending order - Prepare a program to show the Fibonacci numbers

  Write a program in c that arranges and prints out

When playing poker and other card games (standard 52 cards, excluding the jokers), it is usual to arrange a hand to reflect its values. Write a program in C that arranges and prints out a random hand of ten cards in sorted order by pips values.

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Designing a virtual memory manager

our program is to translate each logical address to a physical address and determine the contents of the signed byte stored at the correct physical address

  Generates a random number and asks the user

Write a program in c++ that generates a random number and asks the user to guess what the number is. If the user's guess is higher than the random number

  Why does windows frequently crash

Why use functions at all? Programs can be written without them, so why bother with all the overhead?

  Dynamically allocate an array of menuitems

Dynamically allocate an array of menuItems based on the number of items input. Dynamically allocate a parallel array of integers that will store the quantity of that item in a customer order.

  Sort an array of elements using the quick sort algorithm

Sort an array of 10,000 elements using the quick sort algorithm as follows: sort the array using pivot as the middle element of the array

  Write a c function for reversing circular single linked list

Let A and B be two structures of type linked list. Write a function for creating new linked list C that contains elements alternately from A and B beginning with first element of A. If you run out of the elements in one of the lists then append the r..

  Write a program that allows a salesclerk to enter an item

Write a program in C++ that allows a salesclerk to enter an item's price and the quantity purchased by a customer.

  Cost of carrying additional luggage

The application used to calculate the cost of carrying additional luggage results in erroneous amount, if the weight of the luggage is a fractional number. Help the development team modify the code snippet so that the cost of carrying additional l..

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