Write an application that displays the factorial for every integer value from 1 to 10
Q: Example 3: Write pseudo code that performs the following: Ask a user to enter a number. If the…
A: - The question is to solve the example number 3.
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: What is the value of num when the following code snippet runs successfully? int num = 100; if…
A: According to the question below the solution:
Q: at converts 47 degrees to radians and assig
A: Below statement that converts 47 degrees to radians and assigns the result to a double variable.
Q: Write a program for calculating the simple interest on a loan when the initial prin- cipal amount…
A: PROGRAM CODE: public class Main{ public static void main(String[] args) {…
Q: Write a program that calculates the estimated hours and minutes for a trip given the number of miles…
A: Given: Write a program that calculates the estimated hours and minutes for a trip given the number…
Q: Write a program that calculates the electricity bill. The rates of electricity per unit are as…
A: A function is a square of code which possibly runs when it is called. You can pass information,…
Q: remember, some companies use letters to show their telephone number. For example, the telephine…
A: //Use "stdafx.h" only, if using visual studio. #include "stdafx.h" // Declare necessary header…
Q: Write a program that calculates how much a person earns in a month if the salary is one penny the…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED C++ FOR THE SOLUTION. Define…
Q: Write a program that will allow a grocery store to keep track of the total number of bottles…
A: The solution of the given problem is given below:
Q: 2. Write an application that reads the (x,y) coordinates for two points. This should prompt for and…
A: Ans: Code: import java.util.Scanner;class Main{ public static void main(String arg[]) {…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: Java Programming Write an application that prompts the user for two integers and then prompts the…
A: 1.Take 2 numbers as input from user.2. we have to use switch for menu driven program.3. give option…
Q: You will calculate the gross pay for an individual using the formula gross pay = rate * hours You…
A: System.out.println("Enter Health Insurance tax withholding rate:"); double healthtax =…
Q: Write a program that asks the user to type 10 integers. The program must compute how many even and…
A: Program Explanation: Declare the header files Define the main function Declare an array to store 10…
Q: Write a program that shows ten unique random words, all over ten characters long, that occur in the…
A: Below i have answered:
Q: To make telephone numbers easier to remember, some companies use letters to show their telephone…
A: Program: #include <iostream> using namespace std; int main() { char ch; cout <<…
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: import java.util.*; public class ThreeLetterAcronym{ public static void main(String[] args) {…
Q: In visual basic programming, write a button click even that will take a given amount in cedis and…
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: Complete the code that returns the value of f(x), which has the value 1 inside the range -1 <x<1…
A: def function_f(x): #Code will be added here return fval
Q: Write a program that will allow a grocery store to keep track of the total number of bottles…
A: Pseudocode:- Pseudocode is a made-up, informal programming language that helps programmers create…
Q: Write a program that determines the real roots of a quadratic equation. To calculate the roots of…
A: Given: given by: D = b ^ 2 - 4ac . If D > 0 the program displays message "The equation has two…
Q: We have a house with 3 rooms. We need the user to enter 1 integer as double as the useless area, 1…
A: Introduction: Plan of Action: Create a class residence. ' Created a secret variable for use only by…
Q: Write a program that prompts the user for a number of decimal places between 1 and 10 and returns…
A: #include<iostream> using namespace std; int main(){ int count=0;…
Q: a) A prime number is an integer greater than 1 that is evenly divisible by only 1 and itself. For…
A: """PrimeNumber application that prompts the user for a number and thendisplays a message indicating…
Q: value) Suppose you save $100 each month into a savings account with an annual interest rate of 5%.…
A: Given: value) Suppose you save $100 each month into a savings account with an annual interest rate…
Q: Write a program that asks the user to enter the three sides (a, b and c) of a triangle as double…
A: Since no programming language was mentioned in the question, I have used C language to solve.
Q: Write an application that prompts the user for two integers and then prompts the user to enter an…
A: // C++ program #include <iostream> using namespace std; int main() { int a,b,ch;…
Q: Write a Java program that asks the user for three integer values and displays them sorted in…
A: Lets see the code in the next step
Q: What is the value of this expression: 5<= 2
A: According to the Question below the Solution:
Q: Write a code snippet that reads a number and displays the square, cube, and fourth power with the…
A: As the question has asked about the math. Pow method, I have used Java program which has the math…
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: In this question, we asked to write an application in java to do some operations for valid scores…
Q: Question 3 Write an application that prints each number between 1 and 100 that are divisible by 5 or…
A: Code: public class Main{ public static void main(String[] args) { //declaring required variables…
Q: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED C FOR THE SOLUTION. Define…
Q: A client in a store is buying 5 items: shirt, trouser, hat, shoes, and perfume. Write a program that…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Using Flowgorithm, create an application that reads two integers, determines whether the first is a…
A: To write an algorithm and draw a flowchart for reading two numbers, determines whether the first is…
Q: In this lab, you use the flowchart and pseudocode found in the figure below to add code to a…
A: Required Java code is provided below :
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: Write a program that calculates the future value of an investment at a given interest rate for a…
A: from tkinter import *master = Tk()master.geometry("250x150")master.title("Investment…
Q: • Write an application that inputs one number consisting of 3 digits [for example 125] from the…
A: using System; public class RecExcerise4 static void main() { console.write("\n\n recursion:…
Q: Write an application that gets two numbers from the user and prints the sum, product, difference and…
A: (1)First we need to Design a Java Frame and add all the components and add the listeners to the…
Q: 1. Write an application that converts a weight in pounds into kilograms (1 pound equals 0.45359237…
A: Program Explanation- The pound-to-kilos conversion factor. To get user input, use the Scanner…
Q: A county collects property taxes on the assessed value of property, which is 60 percent of its…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: Write a javascript program that calculates how much a person would earn over a period of time. if…
A: Please check step 2 & 3 for program and output
Q: In an eye-glass shop, a customer can buy either a pair Ol Sngle prescription sunglasses. On each…
A: Since no programming language was mentioned in the question, I have solved in C language.
Q: Write an application that asks a user to enter an integer. Display a statement that indicates…
A: The code should start with asking the user to enter the integer followed by an if else loop that…
Q: (Display Magic Numbers) Display the first N magic numbers, where N is a positive number that the…
A: Mathematical calculations are done in C++ using arithmetic operators, such as +, -, /, * for…
Q: 2.15 LAB: Musical note frequencies On a piano, a key has a frequency, say f0. Each higher key…
A: import math # reading key frequency from usr inputFrequency = float(input()) # calculating value…
Q: Write an application that will take - 5 digit integer from user and calculate the sum of all digits…
A: Program Explanation:- Using the header file. Using the namespace standard input/output function.…
Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a number is the product of that number multiplied by each positive integer lower than it. For example, 4 factorial is 4 * 3 * 2 * 1, or 24. The output would then be The factorial of 4 is 24.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tellsthe ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below: Step 1: Enter the ticket number; for example 123454 Step 2: Remove the last digit, leaving 12345 Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not.. Test your application with the following ticket numbers: - 123454; is a valid ticket number - 147103; is a valid ticket number -…Using C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than O or more than 10, display Score must be between 10 and O and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. An example of the program is shown below: Enter a score >> 6 Enter another score or 99 to quit >>» 7 Enter another score or 99 to quit >» 9 Enter another score or 99 to quit >» 7 Enter another score or 99 to quit >> 99 4 valid scores were entered Highest was 9 Lowest was 6 Average was 7.25
- Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. An example of the program is shown below: Enter a score >> 6 Enter another score or 99 to quit >> 7 Enter another score or 99 to quit >> 9 Enter another score or 99 to quit >> 7 Enter another score or 99 to quit >> 99 4 valid scores were entered Highest was 9 Lowest was 6 Average was 7.25 PLEASE WRITE A JAVA CODE import java.util.*; public class QuizScoreStatistics { public static void main (String args[]) { // Write your code here } }PYTHON PROGRAMMING Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tells the ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below: Step 1: Enter the ticket number; for example 123454 Step 2: Remove the last digit, leaving 12345 Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not. If the ticket number is valid, save the number to a .txt file called “tickets.txt” and continue to loop your program…The Café Noir Coffee Shop wants some market research on its customers. When a customer places an order, a clerk asks for the customer’s zip code and age. The clerk enters that data as well as the number of items the customer orders. The program operates continuously until the clerk enters a 0 for zip code at the end of the day. When the clerk enters an invalid zip code (more than 5 digits) or an invalid age (defined as less than 10 or more than 110), the program reprompts the clerk continuously. When the clerk enters fewer than 1 or more than 12 items, the program reprompts the clerk two more times. If the clerk enters a high value on the third attempt, the program accepts the high value, but if the clerk enters a negative value onthe third attempt, an error message is displayed and the order is not counted. At the end of the program, display a count of the number of items ordered by customers from the same zip code as the coffee shop (54984), and a count from other zip codes. Also…
- 99 question Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tells the ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below: Step 1: Enter the ticket number; for example 123454 Step 2: Remove the last digit, leaving 12345 Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not. If the ticket number is valid, save the number to a .txt file called “tickets.txt” and.Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a number is the product of that number multiplied by each positive -integer lower than it. For example, 4 factorial is 4 * 3 * 2 * 1, or 24. Save the file as Factorials.cpp.Write an application that inputs three integers from the user and displays the sum, average, product, smallest, and largest of the numbers. [Note: The calculation of the average should result in an integer representation of the average. So, if the sum of the values is 7, the average should be 2, not 2.3333….]
- 2. Write an application that will calculate the Cummulative Grade Point Average [CGPA] using While Loop for 3 students. You have to enter the GRADE POINT of 5 different subjects for a student. You have to enter the CREDIT for each of the 5 subjects for a Student. GRADE POINT can take any value as given [5,6,7,8,9,10] CREDIT can take any value as given [2,3,4] CREDIT POINT = GRADE POINT * CREDIT CGPA = CREDIT POINT / Sum of the CREDIT values of all the 10 semesters. Display all the 5 subjects GRADE POINT Display all the 5 subjects CREDIT Display the CREDIT POINT Display the Total of all the CREDIT values Display the CGPA Do the above program for 3 students totally. Save your Shell script as cgpa.shProblem: A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instructions: Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm. In the program flow, input and checking of hourly pay rate should come before that of the number…Print "user_num1 is negative." if user_num1 is less than 0. End with newline. Assign user_num2 with 1 if user_num2 is greater than 12. Otherwise, print "user_num2 is less than or equal to 12.". End with newline. My code: user_num1 = int(input())user_num2 = int(input()) if user_num1 < 0: print("user_num1 is negative.") if user_num2 > 12: user_num2 == 1 else: print("user_num2 is less than or equal to 12.") print('user_num2 is', user_num2) When the input is 0 and 13 my output for user_num2 is 13 and it should be 1. I don't know what I'm doing wrong.