1. Write a C++ program that evaluates the following function based on x value that will...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write a C++ program that evaluates the following function based on x value that will be given by the user. sin(xx) x² (x +ex(x+1) x < -1 -n≤x≤n x>n f(x) = 0 = { 2. Write a C++ program that prompts the user to input the x-y coordinate of a point in the Cartesian plane. The program should then output a message indicating whether the point is the origin, is located on the x- (or y-) axis, or appears in a particular quadrant. For example: (0,0) is the origin (4,0) is on the x-axis (0,-3) is on the y-axis (-2,3) is in the second quadrant 3. Write program to perform simple banking operations. The user at first will be given a starting balance. Then, he will be asked to select one of the following operations: deposit, withdraw or balance inquiry. The account should not allow overdrafts (i.e. Withdraw an amount greater than the current balance) and should prevent user from entering negative values for withdraw and deposit. The program should display the final balance after it performs any deposit or withdraw operation requested by the user. 4. Write a C++ program that calculates and prints the bill for a car rental company. The company charges a daily fee for each day a car is rented depending on the type of the car. Moreover, an additional fee is charged if the car travels more than 400 KM. This fee also varies depending on the type of the car. Type of car Mercedes Toyota Cadillac Jaguar Daily fee 150 60 120 130 Fee for additional KM 15 7 10 Your program should ask the user to enter The type of the car (M or m for Mercedes, T or t for Toyota...) How many days was the car rented? How many KM did the car travel? 5. Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used to determine whether a person is overweight or underweight for his or her height. A person's BMI is calculated with the following formula: 1. Write a C++ program that evaluates the following function based on x value that will be given by the user. sin(xx) x² (x +ex(x+1) x < -1 -n≤x≤n x>n f(x) = 0 = { 2. Write a C++ program that prompts the user to input the x-y coordinate of a point in the Cartesian plane. The program should then output a message indicating whether the point is the origin, is located on the x- (or y-) axis, or appears in a particular quadrant. For example: (0,0) is the origin (4,0) is on the x-axis (0,-3) is on the y-axis (-2,3) is in the second quadrant 3. Write program to perform simple banking operations. The user at first will be given a starting balance. Then, he will be asked to select one of the following operations: deposit, withdraw or balance inquiry. The account should not allow overdrafts (i.e. Withdraw an amount greater than the current balance) and should prevent user from entering negative values for withdraw and deposit. The program should display the final balance after it performs any deposit or withdraw operation requested by the user. 4. Write a C++ program that calculates and prints the bill for a car rental company. The company charges a daily fee for each day a car is rented depending on the type of the car. Moreover, an additional fee is charged if the car travels more than 400 KM. This fee also varies depending on the type of the car. Type of car Mercedes Toyota Cadillac Jaguar Daily fee 150 60 120 130 Fee for additional KM 15 7 10 Your program should ask the user to enter The type of the car (M or m for Mercedes, T or t for Toyota...) How many days was the car rented? How many KM did the car travel? 5. Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used to determine whether a person is overweight or underweight for his or her height. A person's BMI is calculated with the following formula:
Expert Answer:
Answer rating: 100% (QA)
Here are the C programs for each of the specified tasks 1 Evaluate Function cpp include include int main double x Get user input for x stdcout Enter t... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these computer network questions
-
Add a foreign key Payment_id and location to this table CREATE TABLE public. "Services" ( customer_id character varying (30) COLLATE pg_catalog. "default" NOT NULL, internetservice text COLLATE...
-
You are to write a C program that will read from a file, one or more sets of x,y coordinates. Each set of coordinates is part of a Cartesian system. A Cartesian coordinate system is a system that...
-
Goodwill impairment tests are carried out annually. During 2014, goodwill impairment was determined to be $26,000 on the parents share of goodwill and $5,000 on the NCI share. In 2016, impairment in...
-
Erin Danielle Company purchased equipment and incurred the following costs. What amount should be recorded as the cost of the equipment? (a) $24,000. (c) $25,400. (b) $25,200. (d) $25,800. Cash price...
-
Consider the following sample regressions for the linear, the quadratic, and the cubic models along with their respective R2 and adjusted R2. a. Predict y for x = 2 and 3 with each of the estimated...
-
The chess study discussed in this chapter (de Bruin et al., 2007) hypothesized that the number of checkmates should be greater for students asked to make predictions while learning to play chess than...
-
Judy Segura asks your help concerning the relevance: of variable and fixed costs in incremental analysis. Help Judy with her problem.
-
Suppose on January 1 you deposit $100 in an account that pays a nominal, or quoted, interest rate of 11.33463 percent, with interest added (compounded) daily. How much will you have in your account...
-
The income statement and the cash flows from the operating activities section of the statement of cash flows are provided below for Syntric Company. The merchandise inventory account balance neither...
-
Maverick Ltd is a supplier of leisure boats both to the retail trade and to the public. On Monday, Cruise Ltd, one of Maverick Ltd's regular suppliers, agreed to supply Maverick Ltd with 15 carbon...
-
Windsor Corporation incurred the following costs during 2022. Direct materials used in product $120,000 Advertising expense $45,000 Depreciation on factory 60,000 Property taxes on factory 14,200...
-
Under what conditions is an auditor most likely to confirm payables?
-
Lindstedt's perturbation method gives a. periodic and nonperiodic solutions b. periodic solutions only c. nonperiodic solutions only
-
What is a shape function?
-
Explain why dynamic balancing can never be achieved by a static test alone.
-
Why does a rotating shaft always vibrate? What is the source of the shaking force?
-
1 . Deer Co. is expected to pay a dividend of $0.80 per share this year. The dividends are expected to grow at 1.5% each year. If the stock currently sells for $25 per share, a. What is the dividend...
-
For Problem estimate the change in y for the given change in x. y = f(x), f'(12) = 30, x increases from 12 to 12.2
-
Write a program that displays a moving text, as shown in Figure 15.33a and b. The text moves from left to right circularly. When it disappears in the right, it reappears from the left. The text...
-
ISBN-13 is a new standard for indentifying books. It uses 13 digits d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 9 d 10 d 11 d 12 d 13 . The last digit d 13 is a checksum, which is calculated from the other...
-
Write a method that finds the number of occurrences of a specified character in a string using the following header: public static int count(String str, char a) For example, count("Welcome", 'e')...
-
What financial product can a greenshoe be compared to?
-
Company X has capital of 2million shares that are currently trading at BC2000 per share.On its balance sheet it has a liability for an issue of convertible bonds with the following characteristics: ...
-
Why does it take longer to set up a share issuance than a bond issue?
Study smarter with the SolutionInn App