if (income <= 10000) tax = income 0.13; else if (income <= 20000) if (income <= 10000) tax = income * 0.1; else if (income > 10000 && income <= 20000) tax = 1000 + %3D tax = 1000 + (income (income - 10000) * 0.15; 10000) * 0.15;
Q: Rock Paper Scissors Lizard Spock (RPSLS) is an extended version of the classical game of chance Rock…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: 04 what is the result of following if: a=3, b=3? i- ab iv- a>=b V- a==b vi- a!=b
A: Implementing the above statements through C++ langauge. #include <iostream>using namespace…
Q: Write the inverse of the following statement: “If it is winter, then it is snowing.”
A: As given, we need to write the inverse of the given statement. The given statement - "If it is…
Q: Suppose, you have $10 to buy food for a day. You have several options, but you need to maximize…
A:
Q: An electronic shop wants you to write a program to take orders from the clients and print the…
A: while changing from input type to number to string, make sure you clean the unwanted spaces in the…
Q: Given the following: Group A (Tom 40, Dave 67) Group B (Jade 30, Molly 25) Group C (Max 50, Comfort…
A: Algorithm : Step 1 : declare variables. Step 2 : assign the marks of each student in each variable.…
Q: A salesman is paid a commission on the following basis: Sales Value (SV) Commission up to P10,000.00…
A: Steps followed: Declare sales value(sv) and commission(comm) variables. Read sales value (sv) from…
Q: Input Th first line contains one integer t (1 < t < 1000) – the number of test cases. The only line…
A: In this Programming question we have to determine code and output of building with new layout…
Q: Let t0 be a specific value of t. Find t0 such that the statement is true: P(t ≥ t0) = 0.005 where df…
A: Dear Student, To find it's answer we need to refer to t-table . Here given that, P(t ≥ t0) = alpha =…
Q: Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used…
A: Answer in step2
Q: how to solve this in python A retail company assigns a $5000 store bonus if monthly sales are more…
A: Decision control in python: A statement that controls the flow of the program. It is a statement…
Q: In city street grids, intersections are often defined by two integers, counting the position of…
A: We need to add the line int distance = Math.abs(h2-h1) + Math.abs(v2-v1); in the given code to…
Q: Project description The problem here is to make change using the smallest number of American coins.…
A: Code: #include<stdio.h>#include<stdlib.h>int *change(int amount){ int *data =…
Q: The short-term, 0-24 hours, parking fee, F, at an international airport is given by the following…
A: Program Planning: Include necessary header files. Prompt the user to enter the number of hours a…
Q: In Java: year in the modern Gregorian Calendar consists of 365 days. In reality, the earth…
A: import java.util.Scanner; public class Main{ public static void main (String[]args) { Scanner…
Q: Write a program that will accept the following inputs from the user: Company ID,…
A: //Note:since programming language is not given, we are providing answer in…
Q: When you use a mortgage to purchase a home, the lending institution effectively owns the home. You…
A: Answer :
Q: The game of Pig is a simple two-player dice game in which the first player to reach 100 or more…
A: This is required code to perform above problem statement. See below step for code and output:
Q: • P(x): x was sick • Q(x): x went to work R(x): x attended the meeting What is the form of the…
A: 1) Here the statement holds true for all employees. Thus we need to use universal quantifier. Also…
Q: Test Case 1 == One Year Interest Calculator == \n| How much money do you have? \n 100 ENTER What's…
A: GIVEN:
Q: A program calculates the total salary of an employee with the condition that if the working hours…
A: Given:
Q: Jacob is a retailer for ice. Normally a bag of ice costs $2.5, but the price varies with the amount…
A: import java.util.*;public class Main{ public static void main(String[] args) { Scanner sc = new…
Q: uppose, you are working in a company ‘X’ where your job is to calculate the profit based on their…
A: Note:- I am taking the Python part. Program: class FinalQ: def print(self,array,idx):…
Q: The Significance (S-value) of an integer number is the number of the digits that are composing the…
A: PROGRAM EXPLANATION: - The program comprise of multiple parts. The input is taken from user for the…
Q: A corporation named XYZ needs a program to calculate how much to pay their part-time and full-time…
A: The program code is : - for XYZ company : class Employee: def…
Q: MPUTER PROGRAMMING... Choose all the valid variable names. A. point_2_point B.…
A: Choose all the valid variable names. A. point_2_pointB. wage125C. savings#accountD. _grossE. annual…
Q: In investment analysis,the following equation is frequently used; A=P(1+r/100)n Where n =10 years.…
A: PHP program to find A = P(1+r/100)n
Q: Given the following: Group A (Tom 40, Dave 67) Group B (Jade 30, Molly 25) Group C (Max 50, Comfort…
A: Given the following: Group A (Tom 40, Dave 67) Group B (Jade 30, Molly 25) Group C (Max 50, Comfort…
Q: Suppose you can buy chocolate bars from a vending machine for $1 each. Inside every chocolate bar is…
A: Write a test program in C++that would allow the user to enter amount of dollars and then use the…
Q: "XYZ" Company is planning to raise its employees' salaries based on the following percentage basis:…
A:
Q: 1/ A Cuii number is the one whose digit sum is 17. Find out KthCuii number. K is an integer given as…
A: As per our company guidelines we are not supposed to answer more than one question per post and…
Q: Rock Paper Scissors Lizard Spock (RPSLS) is an extended version of the classical game of chance Rock…
A: the code is an given below : You can place this code in your project. #include…
Q: Ask the user to enter a day of the week in 3 letters. * Respond with the meal plan for that day.…
A: PROGRAM: //Header file import java.util.Scanner; //Defining the class class WeeklyMeakPlan {…
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: Introduction What is the probability that in a classroom of x people, at least 2 will be born on the…
Q: n Python input 1 and input 2’s degree is 4 If input 1 and input 2 have same parents, result return 0…
A: SUMMARY: -Hence, we discussed all the points.
Q: Duke Shirts sells Java t-shirts for $24.95 each, but discounts are possible for quantities as…
A: Java Code:- import java.util.*; public class Main { public static void main(String[] args)…
Q: suppose someone pays 100.00 during the first year and that yearly payment keeps on doubling. Display…
A: Summary: In this question, we have been given the yearly payment of a person and his payment doubles…
Q: Java code Ever wondered how change is disbursed to customers in certain stores? In country X the…
A:
Q: Write a program that will determine the salary of an employee based on his or her rank as follows:…
A: Let's understand step by step : Since programming language is not given so using C++. Now steps…
Q: 8. Write a program that will determine the salary of an employee based on his or her rank as…
A: Note: since programming language is not mention , we are providing solution in c++ . please repost…
Q: If you have been given the full amount required and the list represents the amount of change in your…
A: Notes:- quarter: 25 cents / $0.25 dime: 10 cents / $0.10 nickel: 5 cents / $0.05 penny: 1 cent /…
Q: (10 points) Suppose you have just finished approximating f(x) = x5 for 0 ≤ x ≤a and ended up with…
A:
Q: UTAS College teacher need to enter 75 marks of students and find out the following • Find out the…
A: program: //importing essential java package import java.util.Arrays; //import Scanner class…
Q: In order to discourage excess electric consumption, an electrical company charges its customers a…
A: Please note the given values in the output do not reflect the given rate of 7.5 for the first 250 kW…
Q: The short-term, 0-24 hours, parking fee, F, at an international airport is given by the following…
A: Hey! Since you have not specified the programming language you need the answer in, we are solving…
Q: Problem: Qty: X Machine A Total? Current Sol A Sol B Machine B Qty: 1 Machine A takes in X units of…
A: The answer as follows
Q: You have 3 buckets, the first of size 4 gallons, the second of size 10 gallons and the third of size…
A: Question:
Are the following statements equivalent?
Step by step
Solved in 2 steps
- Suppose you are a computer salesman and your income depend on the total sales and commissions earned for the computers that you sell. Commission rates vary depending on how many units you sold (see chart below). Your income equals to the total sales plus the commission where the commission equals to total sales times the commission rate. That is, commission = total sales * commission rate and income = total sales + commission. Total Sales Commission rate % Less than 200 sold 8% (totalsales < 200) Greater or equal to 200 sold 10% (totalsales >=200 & totalsales <400) Greater than to 400 sold 12% (if (totalsales >= 400) Use Multiway if, else if (use as many you need) and else correctly Review slides 3-CH-2 Slide 4 and 8 Write the code correctly as show in the chapter slides. Pay attention to the commission chart above: (3) input as examples shown 500, 250, 150 You can work with your team and submit your code and output in PDF. 1. Provide the user the commission rate list…Suppose you can buy chocolate bars from a vending machine for $1 each.Inside every chocolate bar is a coupon. You can redeem 7 coupons for 1chocolate bar from the machine.For example, if you have $20, you can initially buy 20 chocolate bars.This gives you 20 coupons. You can redeem 14 coupons for 2 additionalchocolate bars. These 2 chocolate bars have 2 more coupons, so you now have atotal of 8 coupons. This gives you enough to redeem for 1 final chocolate bar.Write a recursive function that would accept the amount of dollars andcoupons as its parameters and output the total number of chocolate bars thatcan be bought (including those redeemed via coupons).Write a test program in C++that would allow the user to enter amount of dollarsand then use the recursive function to compute the number of chocolate barsthe user can buy, and output the number to the screen.You have a group of friends coming to visit for your high school reunion, and you want to take them out to eat at a local restaurant. You are not sure if any of them have dietary restrictions, but your restaurant choices are as follows: Joe’s Gourmet Burgers—Vegetarian: No, Vegan: No, Gluten-Free: No Main Street Pizza Company—Vegetarian: Yes, Vegan: No, Gluten-Free: Yes Corner Café—Vegetarian: Yes, Vegan: Yes, Gluten-Free: Yes Write a program that asks whether any members of your party are vegetarian, vegan, or gluten-free, to which then displays only the restaurants to which you may take the group.
- suppose someone pays 100.00 during the first year and that yearly payment keeps on doubling. Display the year where yearly payment is greater than 50,000.00When you use a mortgage to purchase a home, the lending institution effectively owns the home. You buy back part ownership in the home with each monthly payment. The part you have bought back is your equity in the home. If the mortgage amount is P dollars, the monthly interest rate is r as a decimal, and the term of the mortgage is t months, then your equity after k payments is E(k) = P((1 + r)k − 1) (1 + r)t − 1 dollars. In this exercise, assume that the mortgage amount is $200,000, the APR is 6% so r = .06/12 and the term of the loan is 30 years (360 months). (a) Find a formula for the equity. (b) Make a graph of the equity over 360 months, the term of the loan. (c) Does the graph show that you have half-ownership in the home halfway through the term of the mortgage? Halfway through the term of the mortgage corresponds to k1 = _______ payments. From the graph, we see that E(k1) is ________ half of the mortgage amount, so we _______ have half-ownership in the home…The interest paid on a savings account is compounded daily. This means that if you start with startbal dollars in the bank, at the end of the first day you’ll have a balance ofstartbal * (1 + rate/365)dollars, where rate is the annual interest rate (0.10 if the annual rate is 10 percent). At the end of the second day, you’ll havestartbal * (1 + rate/365) * (1 + rate/365)dollars, and at the end of n days you’ll havestartbal * (1 + rate/365)ndollars. Write a program that processes a set of data records, each of which contains values for rate, startbal, and n and computes the final account balance.
- You have a fence post located at the point (x,y) where a goat is tethered by a rope. You also have a house, which is a rectangle with diagonally opposite corners at the points bottom-left: (x1,y1) and top-right: (x2,y2). You want to pick a length of rope that guarantees the goat cannot reach the house. Determine the minimum distance from the fence post to the house, so that you can make sure to use a shorter rope. Recall that the distance formula is: sqrt( (x2−x1)^2+(y2−y1)^2 ) The input consists of a single line containing six space-separated integer values: x, y, x1, y1, x2, and y2. You are guaranteed that x1<x2 and y1<y2, and that (x,y) is strictly outside the axis-aligned rectangle with corners at (x1,y1) and (x2,y2). Return the minimum distance from the goat’s post to the house as a floating-point value from main(). Learning Objectives Be able to create a program with a lesser template. Be able to calculate the min/max of integers. Be able to write a mathematical…Python tic tac toe. Tic tac toe is a very popular game. Only two players can play at a time. Game Rules Traditionally the first player plays with "X". So you can decide who wants to go with "X" and who wants to go with "O". Only one player can play at a time. If any of the players have filled a square then the other player and the same player cannot override that square. There are only two conditions that may match will be a draw or may win. The player that succeeds in placing three respective marks (X or O) in a horizontal, vertical, or diagonal row wins the game. Winning condition Whoever places three respective marks (X or O) horizontally, vertically, or diagonally will be the winner. Submit your code and screenshots of your code in action. Hints : Have a function that draws the board Have a function that checks position if empty or not Have a function that checks player or won or not expected output:A group of people, numbered 1 to N, are sitting in a circle. Starting at person 1, a hot potato is passed. After x number of passes, the person holding the hot potato is eliminated, the circle closes ranks, and the game continues with the person who was sitting after the eliminated person picking up the hot potato. The last remaining person wins. For example: number of passes = 1 and number of players = 5, the order of elimination is 2, 4, 1, 5. Write a program for general values of X and N. Ask a user for the number of people and number of passes To speed up the input and debugging, you may wish to store the names of the people in a file. Make sure no two names start the same letter ( Alex and Ana are not OK). Alternatively, you can number the players. Output number and/or the name of a person being eliminated Output number and the name of the winner Do not expect a user to do the right thing, error check the user input; among other things, what do you think a reasonable…
- A group of people, numbered 1 to N, are sitting in a circle. Starting at person 1, a hot potato is passed. After x number of passes, the person holding the hot potato is eliminated, the circle closes ranks, and the game continues with the person who was sitting after the eliminated person picking up the hot potato. The last remaining person wins. For example: number of passes = 1 and number of players = 5, the order of elimination is 2, 4, 1, 5. Write a program for general values of X and N. Ask a user for the number of people and number of passes To speed up the input and debugging, you may wish to store the names of the people in a file. Make sure no two names start the same letter ( Alex and Ana are not OK). Alternatively, you can number the players. Output number and/or the name of a person being eliminated Output number and the name of the winner Do not expect a user to do the right thing, error check the user input; among other things, what do you think a reasonable…In a game of tic-tac-toe, two players take turnsmarking an available cell in a 3 x 3 grid with their respective tokens (either Xor O). When one player has placed three tokens in a horizontal, vertical, or diagonalrow on the grid, the game is over and that player has won. A draw (no winner)occurs when all the cells on the grid have been filled with tokens and neitherplayer has achieved a win. Create a program for playing a tic-tac-toe game.The program prompts two players to alternately enter an X token and O token.Whenever a token is entered, the program redisplays the board on the console anddetermines the status of the game (win, draw, or continue). Here is a sample run:A video player plays a game in which the character competes in a hurdle race. Hurdles are of varying heights, and the characters have a maximum height they can jump. There is a magic potion they can take that will increase their maximum jump height by unit for each dose. How many doses of the potion must the character take to be able to jump all of the hurdles. If the character can already clear all of the hurdles, return . Example The character can jump unit high initially and must take doses of potion to be able to jump all of the hurdles. Function Description Complete the hurdleRace function in the editor below. hurdleRace has the following parameter(s): int k: the height the character can jump naturally int height[n]: the heights of each hurdle Returns int: the minimum number of doses required, always or more Input Format The first line contains two space-separated integers and , the number of hurdles and the maximum height the character can jump naturally.The…