Concept explainers
In the following exercises, write a
If P dollars (called the principal) is invested at
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
Additional Engineering Textbook Solutions
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
C++ How to Program (10th Edition)
Concepts Of Programming Languages
Starting Out with C++ from Control Structures to Objects (8th Edition)
Digital Fundamentals (11th Edition)
C Programming Language
- 25. Repeat Programming Exercise 24, but the wire is to be bent in the form of a circle. In this case, the user specifies the length of the wire and the program outputs the radius and area of the circle. (You may assume that . Also declare it as a named constant.)arrow_forward(Statistics) This is the formula for the standard normal deviate, z, used in statistical applications: z=(X)/ X is a single value. refers to an average value. refers to a standard deviation. Using this formula, you need to write a program that calculates and displays the value of the standard normal deviate when X=85.3,=80,and=4. a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Determine a formula for converting input items into output items. d. Test the formula written for Exercise 7c, using the data given in the problem.arrow_forwardFirst picture is what I need help with. Second picture is the assignment 6 the first picture referencesarrow_forward
- Question2: Write a program to determine a student's final grade for (Structure, Strength of materials, and Engineering Mathematics) indicate whether it is passing or failing. The final grade is obtained by adding the sum of the oral, attendance, and theoretical activity grades to the average of the three material. by QBasicarrow_forwardDistance traveled. A vehicle is to travel on demand. Its initial location is given as x0, y0 (assume the first statement in your program as assigning initial values, say x0,y0 = 5.0, 5.0). Repeatedly take as input the distance the vehicle has to travel. If the input given is 0 or lesser, the travel ends - assume that at least one positive distance will be given. The direction in which the vehicle is to travel is determined as follows: if distance is = 76 it travels west. Find the final coordinate of the vehicle, the total distance it has traveled, and the straight line distance between the initial location and the final location (use standard formula for distance between two coordinates; note that this distance is not same as total distance traveled). Hint: Initialize current coordinates x,y to x0,y0, and distance traveled to 0. For taking the distance use a while loop (as you dont know how many distances will be given). This can be done in two ways - you can initialize a variable (say…arrow_forwardExtra Credit Question Question 36 Write a program based on following algorithm: I. Input height of student1 in centimeters. II. Input height of student2 in centimeters. III. Input heigh of student3 in centimeters. IV. Compute the average of 3 heights. V. Convert the average height into meters. V. Display the result in following format: The average height of the three student is xx.xx meters. (use 2 decimal place) Note: 1 meters = 100 centimeters. - Narrow_forward
- The Salary Program: Modify the program from the textbook (Program 1-1,see below) which reads the number of hours an employee works reads the pay rate per hour computes the pay for the employee. Add the following steps: a) Read an amount of bonus paid to the employee.b) Compute the total pay as pay plus bonus.c) Compute the tax at 30% of the total pay.d) Compute the net pay as total pay minus tax, and e) Print a report showing: total pay, tax deduction, and net pay. Algorithm: 1. Prompt the user for number of hours.2. Read the value for hours.3. Prompt the user for hourly rate.4. Read the hourly rate.5. Prompt the user for amount of bonus.6. Read the value for bonus.7. Compute the pay.8. Compute the totalPay by adding bonus to pay.9. Compute the tax deduction by multiplying 30% times totalPay.10. Compute the netPay by subtracting tax from totalPay.11. Neatly print and label the following: a. totalPay b. tax c. netPay Put your…arrow_forwardJohn travels a distance of 55 miles at an average speed of 15 miles per hour. Writea program to calculate the total number of hours John takes to cover this distance. The program should print the total time taken in hours and minutes.arrow_forwardExample-6 A number of rivers (N), each river has three (pH) values. Write a program to read the (pH) values and find the average for each river, then print the state of water (neutral, acidic, alkaline). if pH =7 neutral pH > 7 alkaline pHarrow_forward
- Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönderarrow_forwardProblem 7: Pennies for Pay Write a program that caclulates how much a person would earn over a period of time if his or her salary is one penny the first day and two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing how much the salary was for eah day, and then show the total pay at the end of the pay period. The output should be displayed in a dollar amount, not the number of pennies. Input validation: Do no accept a number less than 1 for the number of days worked. A) Write the psuedocode, B.) a flowchart of , and C.) answer to the problemarrow_forwardIn cengage mindtap The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr