Marketing Terms The markup of an item is the difference between its selling price and its purchase price. Two other marketing terms are
where the quotients are expressed as percentages. Write a
Trending nowThis is a popular solution!
Chapter 3 Solutions
Pearson eText for Introduction to Programming Using Visual Basic -- Instant Access (Pearson+)
Additional Engineering Textbook Solutions
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Absolute Java (6th Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Concepts of Programming Languages (11th Edition)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Computer Science: An Overview (12th Edition)
- Modify the BarChart program from Chapter 6 Exercise 13 to accept the number of points scored by each player in a season. The bar chart displays one asterisk for each 10 points scored by a player. For example, if a player has scored 48 points, then display 4 asterisks. An example of the program is shown below: Enter points earned for the season by Art >> 10 by Bob >> 20 by Cal >> 30 by Dan >> 40 by Eli >> 50 Points for Season (each asterisk represents 10 points) Art * Bob ** Cal *** Dan **** Eli ***** import java.util.Scanner; public class BarChart2 { public static void main (String[] args) { Scanner input = new Scanner(System.in); int artPoints; int bobPoints; int calPoints; int danPoints; int eliPoints; final int AMT_EACH_ASTERISK = 10; System.out.println("Enter points earned for the season"); System.out.print(" by Art >> "); artPoints = input.nextInt();…arrow_forwardComputer sciencearrow_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_forward
- Q3. Write an algorithm and draw a flow chart to get student level and CGPA as input and check if student level is "Diploma Second Year" and CGPA is more than equal to 2.5 eligible display "Eligible for Advance Diploma" otherwise display "Not Eligible for Advance Diploma". If Student Level is "Advanced Diploma" and CGPA is more than equal to 2.75 then Display "Eligible for Bachelor" otherwise Display "Not Eligible for Bachelor"arrow_forward25. 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(Physics) Buoyancy is the upward force a liquid exerts on a submerged object, as shown in Figure 6.9. The buoyancy force is given by this formula: B=pgV Bisthebuoyancyforce( lbforN).isthefluiddensity( slug/f t 3 orkg/ m 3 ).gistheaccelerationcausedbygravity( 32.2ft/se c 2 or9.8m/ s 2 ).Vistheobjectsvolume( f t 3 or m 3 ). a. Using this formula, write a function named buoyantForce(double ro, double vol, int units) that accepts a fluid density, the volume of an object placed in the fluid, and the units to be used(1=U.S.Customaryunits,2=metricunits), and returns the buoyancy force exerted on the object. b. Include the function written for Exercise 6a in a working C++ program, and use your program to complete the following chart:arrow_forward
- Exercise 4 Write a program that allows a user to play HiLo game. User wins if he/she can guess the number between 1 and 100 within at most 6 iterations. • If s/he guesses a number greater than the secret number. The message shown is "It is Higher than secret shown" • If s/he guesses a number lower than the secret number. The message shown is “ It is Lower than secret" • If the guessed number equal to the secret number. The message shown is "Cong! you won" • If the user consumed the 6 trails without finding the secret number a message "Sorry! Try again" will be shown before termination. Output - CppApplication_1 (Run) #3 Enter a positive integer seed value: 100 Enter your guess : 40 It is Higher than secret Enter your guess : 20 It is Higher than secret Enter your guess : 10 It is Lower than secret Enter your guess : 15 It is Lower than secret Enter your guess : 17 It is Lower than secret Enter your guess : 18 Cong! you won PE Outputarrow_forward10. The algorithm shown in Figure 1-13 should calculate and print the gross pay for five workers; however, some of the instructions are missing from the algorithm. Complete the algorithm. If an employee works more than 40 hours, he or she should receive time and one-half for the hours worked over 40. read the employee's name, hours worked, and pay rate calculate gross pay = hours worked times pay rate otherwise, do this: calculate regular pay = pay rate times 40 calculate overtime hours = hours worked minus 40 calculate overtime pay = calculate gross pay = end if print the employee's name and gross pay end repeatarrow_forwardC Programming "Functions"arrow_forward
- Conditional Flow Structure. Make a program that will input the monthly salary of Pedro and will output his annual salary and tax due. Compute his tax to be paid based on the ff. rules: if the annual salary is greater than or equal to P60,000 the tax due is 15% of the annual salary otherwise the tax due is 5% of the annual salary.arrow_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_forwardAny year is entered through the keyboard, write a program to determine whether the year is a leap-year or not. ● Comment/Discussion on the obtained results and discrepancies (if any).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