"A program is designed to calculate the tax to be paid. The program takes the salary as an input in integer, and return tax value as double. If the salary input is 24.000 JOD then the tax to be paid is zero. The next 5.000 JOD will be taxed at 7%. The next 10.000 JOD will be taxed at 14%. Any further amount will be taxed at 35%".
Q: With the help of c++, write a code that permits a user to input the surnames of 5 overall best…
A: In step 2, you will the C++ code. In step 3, you can see the sample output. In step 4, you will get…
Q: Answer properly(editable code , output screenshot) is must Write a C++ program to input…
A: Algorithm: 1.Declare main function 2.Declare variables named no_of_units to take units from the user…
Q: Write a program to input for a number, if the number is palindrome, then display its half on the…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: In Python Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon…
A: Step-1: StartStep-2: Declare two variable miles_per_gallon and dollors_per_gallon and take input…
Q: has me a little perplexed as to where to begin. Is it possible that the information I'm receiving is…
A: It is defined as a term which is often used in programming and algorithm based fields. It is a…
Q: Write a program that inputs year and month number, it then display the number of days in that month…
A: The given problem is to be solved in programming language where the user will input the year and…
Q: Write a program that reads any 5 numbers as in the given sample of output below: Sample of…
A: Required: Write a program that reads any 5 numbers as in the given sample of output below:
Q: program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the gas…
A: Introduction of Program: In this C++ program, the User enters the car consume how many miles in 1…
Q: Write a programc++ which read the salary and employee makes then compute the total salary by using…
A: #include <iostream> using namespace std; int main(){ double sal; // accept input from…
Q: Write a python program that displays every integer between 1 and 100 that is divisible by 5 or 7,…
A: Using While loop output : Editable code : i = 1while i<100 : if i % 5 == 0: if i…
Q: Write the program to take input for a number if the number is palindrome,then display it's half on…
A: Palindrome is a number that is equal to its reverse 1221 = reve(1221) =1221 #include…
Q: Given 3 integers, output their average and their product, using integer arithmetic. Ex: If the input…
A: ACTUALLY FLOATING POINT ARITHEMATIC TAKES CEIL VALUE:
Q: Write a program that does basic arithmetic operations (addition, subtraction, multiplication, and…
A: Program: //include the header file # include <iostream> using namespace std; //definition of…
Q: Write program c++ to input a variable can accept any of the following value: A, & , B, 1, *, 3 as…
A: Sample Response: //C++ program to accept a value and prints its data type and…
Q: in python Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon…
A: Below is the required python program: - Approach: - Defining the method driving_cost with…
Q: Write a complete program using console input and output. 1. Use iomanip library functions to…
A: setw(size) function in iomanip library is used to display the output with defined 'size'. use…
Q: Write a program that prompts the user to enter a value for a variable named x and then prompts the…
A: Launch Matlab application. Click on the + New Script button Save the script file.
Q: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be,…
A: Program code: #include <iostream> #include <cmath> using namespace std; //main method…
Q: Part E Question 1 Part E Question 2 Part E Question 3 Part E Question 4 Part E Question 5 Part E…
A: Since no programming language is mentioned, I am using c++ Algorithm: Start Initialize total to 0…
Q: A university recently conducted a survey with regards to demographics and programmes in which…
A: Please refer below code for explaination as comments are given below: // Online C compiler to run C…
Q: Using C++, write a program that will check the employees years in service and office. The user will…
A: Given: Using C++, write a program that will check the employees years in service and office. The…
Q: Write a program to enter the length and width of a rectangle and the radius of a circle. Assume the…
A: Start Input length Input width Input radius Calculate Area of Rectangle - Area of Square Display the…
Q: Write the program using c++ that computes an employees pay. The program should input the number of…
A: #include <iostream>using namespace std;int main() { float…
Q: Problem 4. Write a program that will accept the tuition fee and compute the total tuition fee based…
A: The Answer is in Below steps
Q: Draw the flowchart for a program that calculates the amount of tax withheld from an employee's…
A: The flow chart is a step by step process, it specifies the steps in diagramatic way by using flow.
Q: Write a program that reads in loan amount, annual interest rate and number of years for the loan and…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time…
A: Note: As no language is mentioned, therefore answering the given question in python. Input : age…
Q: The population of town A is less than population of town B. However, the population of town A is…
A: To solve the given Query, first of all you need to prompts the user to enter the population and…
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Though the question did not specify the programming language, the program has been developed using…
Q: Q7 Draw the flowchart and write a C program using else if to calculate the total amount to be paid…
A: The program prompts the user to enter basic loan amount and number of years. Basic loan amount is…
Q: Write a program that reads from the user the product unit price, tax percentage to be applied on the…
A: Given: write the program using java
Q: A person is eligible to be a US senator if they are at least 30 years old and have been a US citizen…
A: PROGRAM EXPLANATION Take personage and years of citizenship as input from the user. Now, using the…
Q: Create a program that tells you how much money you have left after some expenses. Use these steps as…
A: To solve this problem,you have a function aaa which will prompt the user for expenses.After that…
Q: The following equations estimate the calories burned when exercising (source): Women: Calories = (…
A: Program: #definition of main function if __name__ == '__main__': #get the inputs data =…
Q: QUESTION#4: Write a program that input a number n and then input n numbers. The program must…
A: //importing packageimport static java.lang.Float.sum; //importing packageimport java.util.Scanner;…
Q: write a program c++ If money is left in a particular bank for more than 5 years, the bank pays…
A: Given: write a program c++ If money is left in a particular bank for more than 5 years, the bank…
Q: Write a program that inputs the hourly rate and number of hours worked. Compute and display the…
A: Here I have taken input from the user and then stored it into 2 different variables. Next, I have…
Q: Q1: Write a program that input four grades for six students and output a. The grades summation for…
A: #include<iostream.h>#include<conio.h> #include<dos.h> void main ( ) {…
Q: Write a program which accepts days as integer variable and display total number of years, months and…
A: import java.util.*;public class Main{ public static void main(String[] args) { int…
Q: Write a C++ program which calculates percentage of three subjects and then prints, the student is…
A: #include <iostream> using namespace std; int main(){ float m1,m2,m3; float…
Q: Write a C++ program to play the lottery. The program prompts the user to enter an initial sum of…
A: logic: define one function to get reverse of number. Define another function to check generated…
Q: The program below computes the maximum exam mark for multiple students. The user enter student name…
A: Program: name = input ("Enter student name: ") while name != "": max = float (input…
Q: The program should Compute an investment report based on the paycheck amount from program #1 by…
A: PROGRAM INTRODUCTION: Take the total number of hours worked from the user. Take dollars paid per…
Q: in C Write a program to calculate the size of a room and the costs to strip and sand, and seal it.…
A: 1) Below is C Program to calculate the size of a room and the costs to strip and sand, and seal it…
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: 1) Since you have not specified programming language I have written program in python language 2)…
Q: Write a program that computers and assess the tuition fee of the students in one trimester, based on…
A: Program Explanation- Enter the tuition fee. Print choice menu. Switch between the choices. Fee…
Q: 12. Write an improved version of the futval.py program from Chapter 2. Your program will prompt the…
A: CODE:- 1. Call the main() function. 2. Display the result in the tabular format. 3. Print the…
Q: Write a program with total change amount in pennies as an integer input, and output the change using…
A: def exact_change(user_total): user_total = int(input('Enter change: ')) if user_total <= 0:…
Step by step
Solved in 2 steps
- Design the test case for boundary value analysis of the following consider a program that prompts the user to input 3 number (say x y z) and the data type for input parameters ensures that You must take values of x y z as any 3 non zero numbers from your Student-ID. The program should then output the numbers in ascending ordermy student id is 64174zero-pressure specific heat of dry air cp in kJ/(kg K) is given by: cp = 0.99403 + 1.671 × 10−4T + 9.7215 × 10−8T 2 −9.5838 × 10−11T 3 + 1.9520 × 10−14T 4 Here T is absolute temperature in K.Write a MATLAB script (a) to plot cp versus T in the range between 0 to 1500 K, and (b) to determine the temperature that corresponds to a specific heat of 1.1 kJ/(kg K) with MATLAB polynomial functions. NOTE: 1. Axis titles and units are compulsory 2. The range the axes are to be set in such that the plot is visible in at least 70% of the plot canvassAnswer this question, also show how you have solved it. Use De Morgan’s laws to write negation for the following statement: a. The dollar is at an all-time high and the stock market is at a record low. b. This computer program has a logical error in the first ten lines or it is being run with an incomplete data set .
- /*** The program below, while has the correct output, doesn't follow the game’s logic at all.* Instead, it follows a certain pattern that's present in the game.* Consider the 100th locker. Following the games rules, this locker should be visited by the 1st, 2nd,* 3rd, 4th, 5th, 10th, 20th, 25th, 50th, and 100th student. Coincidentally, these are also the positive* divisors of 100. Similarly, the 30th locker is visited by the students whose numbers are 1, 2, 3, 5,* 6, 10, 15, and 30. Note that if the numbers of positive divisors of a locker number is odd, then at* the end of the game, the locker is open. if the numbers of positive divisors of a locker number is* even, then at the end of the game, the locker is closed.*/import java.util.Random;public class Locker{public static void main(String[] args){Scanner keyboard = new Scanner(System.in);int studentVisitCount = 0;System.out.print("Enter the number of lockers: ");int numberOfLockers = console.nextInt();for(int x=0;…When 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…not handwritten 4-Compute the weakest precondition for the following statements A. A. x = 8x +( 2 y + 4x); y=4*x+ 4 {y > 16} B. if (x > y) y=2*x+ 4 else y= 6 * x+3; {y > 3}
- According to the assignment rule, what should be the precondition in the following program segment?{precondition}x = x − 2{x = y}Modify the below program that the input values representingfractions are stored with denominators that are positive integers. You cannot require the user to only enter a positive denominator value; the user should not be inconvenienced by such a restriction. For example, whilst values of 1 / -2 are acceptable inputs for a fraction, the output representation should be -1 / 2. Your solution should check the denominator input; if it is negative, swap the sign of both numerator and denominator instance variables. //Import the essential package import java.util.ArrayList; import java.util.Scanner; //Define the class Fraction class Fraction { private int n, d; public Fraction() { //Initialize the values this.n = this.d = 0; } public Fraction(int n, int d) { //Initialize the variables this.n = n; this.d = d; } //Define the getter function getNum() that returns the numerator public int getNum() {…1. Give the unifyiing substitition for (x,y,z are variables): f(a) f(b) 2. Give the unifyiing substitition for (x,y,z are variables): g(x,x) g(f(a),f(y)) 3. Give the unifyiing substitition for (x,y,z are variables): g(x,x) g(f(a0,f(b))
- Let Q(x, y) denote xy< 0 The domain of x is {1,2,3} and the domain of y is {0, -1, -2, -3). Implement the code that outputs the truth values of the following quantifications: 1. ∀x ∀y Q(x, y) 2. ∀x ∃y Q(x, y) Display values of variables x and y if the quantification is true.In Matlab and octave, "rand" built in function gives a random number between 0 and 1. "Type rand and see that a number is returned between 0 and 1". Using the rand function write a script that. Write a script that generates random numbers between 0 and 10 using the rand function. The script must also tells the user if the produced random number is bigger than 5 or equal or less than 5. Such as: X>5 "The number is bigger than 5" XI have an assignment that needs to be turn in before monday, here's the question: Two people play the game of Count 21 by taking turns entering a 1, 2, or 3, which is added to a running total. The player who adds the value that makes the total reach or exceed 21 loses the game. Create a game of Count 21 in which a player competes against the computer, and program a strategy that always allows the computer to win. On any turn, if the player enters a value other than 1, 2, or 3, force the player to reenter the value. Save the game as Count21.java. Here's the code that I'm working on: import java.util.Scanner;public class Count21 {public static void main(String[] args) {// Scanner object to get user inputScanner scanner = new Scanner(System.in);// Stores the running total. //Displays a welcome for the user public void promptEnterKey(){System.out.println("Welcome to Count21! \n");System.out.println("Press \"ENTER\" to continue...");Scanner scanner = new…