Question

Think of one of your Math homework. How can you use program to reveal the answer? Write a calculation program with atleast ten(10) variable statements calculating a problem..

Your program should include:

  • Variables for each part of problem. See example below:

Eg. $apple = 10, $orange = 15, $discount = 0.2

<!DOCTYPE html>

<html>

<body>

<?php

$apple = 10;

$orange = 15;

$discount = 0.2;

echo ($apple + $orange) * $discount;

?>

</body>

</html>

Expert Solution

Want to see the full answer?

Check out a sample Q&A here
Blurred answer
Students who’ve seen this question also like:
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
Not helpful? See similar books
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Using Data. 13PE
marketing sidebar icon
Want to see this answer and more?
Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Correct the syntax errors in the following program, and rewrite the program so that it follows our…

A: The operator(=) is called the assignment operator that is used to assign the right side operand…

Q: I always find myself asking at the end of the month, “Where did all that money go?" I'm sure this…

A: Purpose of the program: This program prompts the user to enter the number of categories for which…

Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…

A: Program code: //include the required packages #include&lt;iostream&gt; #include&lt;cstdlib&gt;…

Q: Write a program to perform the following? Ask the user for the name? Ask the user to input five test…

A: python code: name = input("Enter name: ")l=[]for i in range(5):    n=int(input("Enter marks: "))…

Q: Write a program to perform the following? Ask the user for the name? Ask the user to input…

A: Since the Programming language is not mentioned in the question, we will answer this question in C++…

Q: Write a program that determines an integer value the user had in mind. Your program first asks the…

A: def startGame(l, u):    while l != u:        number = (l + u) // 2         print("Is the number…

Q: Write a program that simulates the rolling of two dice. The program should use rand twice to roll…

A: Here, I write C program for the above question.

Q: Write a program that simulates the rolling of two dice. The program should use rand twice to roll…

A: Actually, given information: Write a program that simulates the rolling of two dice. The program…

Q: Write a program that simulates the rolling of two dice. The program should use rand twice to roll…

A: Answer : Please find the code below::: #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main()…

Q: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all…

A: #include &lt;iostream&gt;#include &lt;fstream&gt;#include &lt;cmath&gt;#include &lt;iomanip&gt;using…

Q: C++) Write a program with total change amount as an integer input, and output the change using the…

A: /*Write a program with total change amount as an integer input that outputs the change using the…

Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…

A: According to the information given:- We have to preform  flipping a coin to make decisions. take…

Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…

A: Program algorithm- STARTStep 1: Import the essential headers.Step 2: Define the main function.Step…

Q: Write a program with total change amount in pennies as an integer input, and output the change using…

A: ANSWER:-

Q: Write a program with total change amount as an integer input, and output the change using the fewest…

A: Thank you for your question. As you have not mentioned any specific programming language for the…

Q: Write a program with total change amount as an integer input, and output the change using the fewest…

A: Here we make a simple program  to coin change: we make function figure below:

Q: Write a program with total change amount as an integer input, and output the change using the fewest…

A: CODE:- amount = int(input("Enter Amount:  ")) #if input is less than 1 if amount&lt;=0:…

Q: Question 3: Write a Java program that takes two numbers from user as input and display the sum…

A: PROGRAM STRUCTURE: Import the required classes and packages. Start the definition of the public…

Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…

A: you are increasing value of i two times. There is problem.  Make sure save your file after writing…

Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…

A: For the given question, we have to design a Python program that does/includes the following :…

Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…

A: read number_of_flips  pass it to function.  set i=0    while i&lt;number_of_flips:…

Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…

A: pass number of flips to function call heads_or_tails()     iterate from i=0 to i&lt;n        call…

Q: Write a program with the total change amount in pennies as an integer input, and output the change…

A: In the above problem, we need to calculate the total change amount in pennies as an integer input…

Q: For this problem, you are going to design a game for the children to teach them about numbers. You…

A: Since no programming language is specified, I am using python. Algorithm: Start Read a number If…

Q: Write a program with total change amount in pennies as an integer input, and output the change using…

A: First, figure out how we want to represent the data on the computer: Data Representation: Represent…

Q: Write a program with total change amount in pennies as an integer input, and output the change using…

A: Java program with total change amount in pennies as an integer input, and output the change using…

Q: Write a program with total change amount in pennies as an integer input, and output the change using…

A: Main logic to convert input value to quarter, dime, nickle and penny.…

Q: Write a program that simulates the way the calculator -) works when the user enters two variables…

A: Solution Program Approach     SIMPLE CALCULATOR program  This program is used to simulate a…

Q: Write a program that simulates the rolling of two dice. The program should use rand to roll the…

A: 1. Create an array of integer of length 13       a. loop from 0 to 36000                i. get…

Q: How do I solve this problem in java programming language?   After all loan information is input,…

A: The output has no now line as there is no line break. The information has been printed in one line.…

Q: A. Sum of Others: Write a program called sum_of_others.py Given three numbers x, y, 2, determine if…

A: According to the Question below the solution:   Output:

Q: Consider the following program in which the statements are in the incorrect order. Rearrange the…

A: C++ used to answer this question

Q: I am trying to write a C program to find the percentage of marks obtained when the user enters marks…

A: Given Code:  #include &lt;stdio.h&gt; int main(){int totalMarks = 500;int…

Q: I am trying to write a C program to find the percentage of marks obtained when the user enters marks…

A: Program is absolutely right. Run it properly here i am attaching screenshot of program and output…

Q: I am trying to write a C program to  find the percentage of marks obtained when the user enters…

A: The error in the program is int is not divisible by a float.  hence the correct code is:

Q: Write a program that reads the following information and prints a payroll statement: Employee’s name…

A: Answer:

Q: The ancient Greeks classified numbers geometrically. For example, a number was called "triangular"…

A: Sample Response: // C++ program to check whether a number is a triangular number or not by using…

Q: Write a program that mimics a calculator. The program should take as input two integers and the…

A: Please find the answer below :

Q: Write a program with total change amount as an integer input, and output the change using the fewest…

A: Code in python  sum = int(input("Enter Amount: "))  #Check whenever input is under 1  on the off…

Q: Write a program with total change amount as an integer input, and output the change using the fewest…

A: def main(): # get change amount as input from user change = int(input("Please enter amount due "))…

Q: Suppose you deposit a certain amount of money into a savings account that earns compound monthly…

A: The below-given javascript program will obey the following rubrics: Declaring a function,…

Q: You were hired by PAGCOR as part of programming team in-charge of automating its BINGO game. Your…

A: Step 1: Accept Number n form user Step 2: if Number between 1 to 15  the print "That's Letter 'B' in…

Q: A salesman has n things to sale. The cost price of all n things is different out of which p things…

A: The profit percentages are same for all items sold for profit. So, you can calculate m% profit on…

Q: In Python: Write a program with total change amount as an integer input, and output the change…

A: Approach: Defining the main function  Getting the input from the  user that is the change  Checking…

Q: I am trying to create a blackjack program that adds up the total of 2 input characters, but it seems…

A: Mistakes in the given program code: In the program code, the input is read in a total variable.…

Q: Use your computer to answer the machine problem below: 1. Write a program that will compute the…

A: // f. the preprocessor derivatives #include&lt;bits/stdc++.h&gt; #include&lt;cmath&gt; using…

Q: Write a program that prompts the user to enter an even integer in the twenties. Using logical…

A: The given problem is to create a program in Python language that will take on integer input from the…

Q: Draw the flow chart for the following program, and; What does this program print ( follow the…

A: Flow chart of the code below:

Q: I need to write a java program that reads in a month from the keyboard, as a String (i.e., January),…

A: Program: //header file import java.util.Scanner;   //definition of main class public class Main {…

Knowledge Booster
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • Write a program that determines an integer value the user had in mind. Your program first asks the user to enter the lower and upper bounds of the range that the integer belongs to, and then presents a series of questions “Is the number greater than x?” with yes/no answers to the user in order to determine the integer value that the user had in mind.  For instance, if the integer in mind is 5 and the interaction between the user and your program is:   Please enter the lower bound: -10 Please enter the upper bound: 50 Is the number greater than 20 (Y/N)? n Is the number greater than 4 (Y/N)? y Is the number greater than 12 (Y/N)? n Is the number greater than 8 (Y/N)? n Is the number greater than 6 (Y/N)? n Is the number greater than 5 (Y/N)? n   Your program should then print: The number you had in mind is 5   Your program should ask roughly log2(upper_bound − lower_bound) questions. Your program A3_1.py should include a main() function and may include other functions that you prefer.…
    Imagine you are working for a lumber company, and your employer would like a program that calculates the cost of lumber for a customer order. The company sells pine, fir, cedar, maple, and oak lumber. The lumber is priced by board feet. One board foot equals one square foot that is one inch thick. The price per board foot is given in the following table: Pine 0.89 Fir 1.09 Cedar 2.26 Maple 4.50 Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet.   For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet).   Create a blank c++ Give the customer instructions and then ask the user (customer) to identify the items they wish to purchase by inputting the type of wood, the length, width, & heights of the board, and the number of boards they desire. Allow the user to…
    How do I solve this problem in java programming language?   After all loan information is input, the program should output the loans in the following format: Sanchez Construction Loan #1 Name: Joe $10000.0 for 5 year(s) at 9% interest Loan #2 Name: Sara $5000.0 for 3 year(s) at 10% interest Loan #3 Name: Mike $975.0 for 1 year(s) at 10% interest Loan #4 Name: Jane $7000.0 for 5 year(s) at 9% interest Loan #5 Name: Peter $300.0 for 1 year(s) at 9% interest
  • You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: Pine 0.89Fir 1.09Cedar 2.26Maple 4.50Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no…
    Write a program to perform the following? Ask the user for the name? Ask the user to input five test scores and calculate the total of the test scores and Average of the test Scores. Using the following 10-point grading scale for the average tests score, display the grade and reward the gift certificate using the formula.   Average testscore Grade Gift Certificate formula 90 and above A 120% of average testscore 80–89 B 60% of average testscore 70–79 C 20% of average testscore 60–69 D 0% of average testscore   Please display Name of the user,  five test scores, total, Average test score,  Grade and the Gift Certificate amount based on above user input and calculations.
    Please do this in Python Programming and provide Screenshots The output should be exact same like in the examples. If the output in the example is in 2 decimals, then it should be like that.    1c - Othello 1 Othello, is a 2-player deterministic (no use of dice), perfect information (no information only known to one of the players) board game, similar to chess or go. The goal of this assignment is to give some information about the outcome once an Othello game has finished. This information is obtained by two measurements: The percentage of black pieces of all the pieces on the board. The percentage of the board that is covered in black pieces. The Othello board measures eight squares by eight squares, making the total number of squares sixty-four. Write a program that takes the number of white pieces followed by the number of black pieces as input. Print the two percentages as output. Enter the number of white pieces on the board: 34Enter the number of black pieces on the board:…
  • Write a program in C language to simulate tossing a “fair” coin. Allow the user to enter the number of tosses.Print the number of tosses that yield heads and the number of tosses that yield tails.What should be the percentage distribution of heads and tails?  (Use the function rand_int)
    The manager of Mama Calari’s Pizza Palace wants a program that calculates and displays the number of pizza slices into which a circular pizza can be divided. The manager will enter the radius of the entire pizza. For this exercise, use 14.13 as the area of a pizza slice, and use 3.14 as the value of pi. Desk-check your solution’s algorithm using 10 as the pizza’s radius; then desk-check it using 8. (Hint: For the first desk-check, the number of pizza slices should be a little over 22.)
    You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: Pine 0.89Fir 1.09Cedar 2.26 Maple 4.50Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no…
  • Write a Java program that prints the following table (including formatting). ///////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\ == ‘Student Points’ == \\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////// Name Lab Bonus Total Percentage ---- --- ----- ----- ---------- Joe 43 7 William 50 8 Mary Sue 39 10
    The programming language is C++, write a program for each items base on the given statement.   1. Due to poor result of an examination, your professor decided toincrease each student by 1 point. Input the grade and print the newgrade. If the original grade exceeds 100, then it remains as such. 4. A college student who is registered for 21 units or more is consideredas full time student. The tuition fee for full time is 7000. A part timestudent is charged 300 per unit for tuition. Given the number of unitsa student is registering, calculate and print his tuition fee on the basisof the given criteria.
    What is the probability that in a classroom of x people, at least 2 will be born on the same day of the year (ignore leap year)? Use a Monte Carlo Simulation and a frequency table to write a program that calculates this probability, where the number of people (x) in the simulated class is given by the user.  The probability for a class of size 23, should be right around 50%. NO language of "break" or "true" please! PLEASE USE THE OUTLINE GIVEN BELOW TO WRITE THE CODE: # What is the probability that in a classroom of x people, at least 2 will be born on the same day of the year (ignore leap year)?# I have given you the skeleton and some of the code... you complete it using a frequency table!# Note:  In a classroom of only 23 people, the probability is about 50.7%  !# Try first with 10000 trials and then try with 100000 trials.  This code runs somewhat slowly in repl.it import mathimport random # create and initialize frequency table:ft = []k = 0while(k < 365) :  ft.append(0)  k = k+1…
    • SEE MORE QUESTIONS
    Recommended textbooks for you
  • EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Programming Logic & Design Comprehensive
    Computer Science
    ISBN:9781337669405
    Author:FARRELL
    Publisher:Cengage
  • EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
    Programming Logic & Design Comprehensive
    Computer Science
    ISBN:9781337669405
    Author:FARRELL
    Publisher:Cengage