2. Write a program that will read a number and will display the factors of the number. Factors are numbers that can divide the given number exactly, or they are numbers that when multiplied will result to the number. For example, if the given number is 6, its factors are 1, 2, 3 and 6. When you multiply 1 and 6 it will result to 6 and so is multiplying 2 and 3. Number 6 can also be divided exactly by the numbers 1, 2, 3 and 6.
Q: Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers…
A: PROGRAM: #while loop while True: #Getting input from the user phoneNum = input('Enter the number…
Q: Sometimes we write similar letters to different people. For example, you might write to your parents…
A: Note: Since no programming language is mentioned in the question, the program has been provided in…
Q: Write a program that reads the following information and prints a payroll statement: Employee’s name…
A: 1. Input All values 2. Calculate gross=hour_pay_rate*10 deduction=gross*0.20 state=gross*0.09…
Q: Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers…
A: Answer:
Q: 10) Write a program that translates a letter grade into a number grade. Letter grades are A, B, C,…
A: note:- always mention programming language name in question, this is done in python. logic:-…
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades in…
A: Note: As no language is mentioned, therefore answering in python Input : Number of students Grade…
Q: Write a program that picks four cards from a deck of 52 cards and computes their sum. An ace, king,…
A: program plan: Write a program that picks four cards from a deck of 52 cards computes their sum with…
Q: Q1: Write a program that reads 10 numbers and then finds the largest number and prints it and finds…
A: - The question wants us to find the largest and smallest number after reading 10 numbers and print…
Q: Write a program that takes user input describing a playing card in the following shorthand…
A: Hello Student. Greetings Hope you are doing great. As you have not specified any particular language…
Q: 3. Write a program that takes a bank account balance and an interest rate as an input. And then…
A: #include<stdio.h>int main(){ int initialBalance; float interestRate; int…
Q: Homework01. Write a Java program that prompts the user to enter the seconds as a String (e.g.,…
A: - The question is to complete the conversion.
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 can be used to calculate the federal tax. The tax is calculated as follows: For…
A: Purpose of the program: This program computes the taxable income and the federal tax amount for a…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: The question is to write a code for the given problem and no language has been mentioned, here C++…
Q: 3. Write a program that takes a bank account balance and an interest rate as an input. And then…
A: Solution : Solving above question in c++ please see to it ... Code :: .…
Q: Given the value of n from the user, write a program that will display the first n even numbers. Ex.…
A: Programming approach:- Using the necessary header file. Using namespace standard input/output.…
Q: The ancient Greeks classified numbers geometrically. For example, a number was called "triangular"…
A: A number is said to be a triangular number if the sum of the dots in the number is equal to the sum…
Q: 5) Write a program to determine the number of thousands, hundreds, tens, and ones in a given integer…
A: #include <stdio.h> int main() { int n=8532; // declare and initialize the digit int…
Q: In this program you will ask the user for 4 integers that represent two fractions. First ask for the…
A: function main: Start Declare a, b, c, d, sum Display "What is the numerator of the first fraction?…
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: Write a program with total change amount as an integer input, and output the change using the fewest…
A: Lets see the solution.
Q: Write a program that asks the user to enter the three sides (a, b and c) of a triangle as double…
A: Answer the above question are as follows:
Q: Write a program that first reads the value n, which is the number of numbers to average. It should…
A: Check the python code below.
Q: Write a program that computes the fuel efficiency for a multi-leg journey. The program will first…
A: Code To Copy: #Define the main() function. def main(): #Prompt the user to enter the…
Q: write a program. There are three seating categories at a stadium. For a softball game, Class A…
A: #include <iostream>#include <iomanip>using namespace std; int main(){ int…
Q: In this program you will ask the user for 4 integers that represent two fractions. First ask for the…
A: In this program, the user is asked for 4 integers that represent two fractions. First ask for the…
Q: Write a program that allows a user to enter any number of student quiz scores, as integers, until…
A: Since you haven't mentioned the programming language, we are answering this question in C++. Program…
Q: (b) In a crypto-arithmetic puzzle, a mathematical equation is written using letters. Each letter can…
A: Python Program: From itertools import combinations, permutations x = input("Enter the value of x: ")…
Q: 8. Write and run a program that reads the user's age and then prints "You are a child." if the age <…
A: As Bartleby guidelines i can solve one question at a time so please post another question again.…
Q: Write a program that asks the user for two positive integers between 2 and 10 to use for the length…
A: Code #include <iostream> using namespace std; int main() { int a,b; cout<<"enter two…
Q: Create a program that asks the user to tell a story using input from the keyboard and print it Ask…
A: your question is about python programming. let's write the code for it
Q: Write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a…
A: #include <stdio.h>//The code execution begins from the start of the main() function.int main()…
Q: Write a program that prompts the user for a U.S. dollar amount and then converts it to Japanese Yen,…
A: Purpose: In this the dollar has to be converted into yen, Pound, Currency and then it has to…
Q: Write a program which input radius of circle and compute area of it. Then input the length of side…
A: EXPLANATION - Create a program . Declare three variable radius , length , area1 , area2 . Take…
Q: Write a program that reads the marks of a student in the test (te), midterm (mid), assignment…
A: I am uploading the handwritten solution in the next step. As there is no programming language…
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: i tried like this in java code: java code: public class Test { static double compute(double…
Q: For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a…
A: c# program for Pizza Price using System; class MainClass { public static void Main (string[] args)…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: PROGRAM: //header files #include <iostream> #include<iomanip> //using namespace using…
Q: 3. Given the value of n from the user, write a program that will display the first n even numbers.…
A: The problem is based on the basics of loops in java programming language.
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: Python Code Standard_Exemption = 4000; Tax_Salary = 0.0 tax = 0.0 child = 0 Marital_Status =…
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 can be used to calculate the federal tax. The tax is calculated as follows: For…
A: Actually, c++ is a powerful general purpose language. The, code has been below:
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: java code: public class Test { static double compute(double lat1, double lon1,…
Q: Write in a python program..According to the starting and ending values entered on the keyboard,…
A: Take two variables for left and right for start value and end value Take total =0 Repeat step 4 and…
Q: • Write a program that computes the average of 5 students grades which are entered by the user.…
A: Please find the answer below :
Q: In JAVA language: Write a program to print the sum of all numbers which are divisible by 3 in the…
A: Write a program in JAVA language that prints the sum of all numbers which are divisible by 3 in the…
Q: Write a program that reads from the user a character (ʻq’ or 'c'). If the character is 'c', the…
A: int main() { printf("enter the character :"); scanf("%c" &a); if(a=='c') { int r; scanf("%d",…
Q: Write a program that displays a table of speeds in kilometers per hour with their values converted…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){ int…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: Purpose of the program: This program computes the taxable income and the federal tax amount for a…
Step by step
Solved in 4 steps with 2 images
- 1. A mall in Oman wants you to create a program that they can use to compute for the discounts to be given to shukran card holders. The program should prompt the user to enter the name of the customer and the number of purchases. The number of purchases will serve as the counter for the number of times purchase amount will be entered by the user. The program should be able to count the number of purchase amounts in each of the following ranges: •1 to 10 • 11 to 30 • Above 30 The program should also compute the sum of all the purchase amounts. A discount is computed based on the sum of the purchase amount. If the sum of the purchase is more than 500, the discount is 2.5% of the sum; otherwise, the discount is 5% of the sum. Display an appropriate output. 2. Write a program that will read a number and will display the factors of the number. Factors are numbers that can divide the given number exactly, or they are numbers that when multiplied will result to the number. For example, if the…Problem: 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…Bob a builder has come to you to build a program for his construction business. He needs to determine the square footage of a room in order to buy material and calculate costs.Bob charges $425 per square metre.the program is going to ask the user to enter the name of a room . It will then ask you for the width and length of a room (in metres) to be built.the program will calculate the room area and use this information to generate an approximate cost. Your program will display the room , the total area and the approximate cost to the screen
- In C++ please, using basic programming one coding The main menu should show the available options: Show the roster: Displays all the player names and jersey numbers in a numbered list. Ex: 1. Susan Martinez (33), 2. Jake Smith (21), etc. Add a player: Prompts the user to type the player's full name and jersey number. Then adds the player to the roster. Remove a player: Displays the roster and prompts the user to enter the number of the player to remove. Then removes the player from the roster. Quit: Quits the program. The program should display the main menu after the user shows the roster, adds a player, or removes a player. The program only terminates when the user chooses the quit option. Data validation should be used where appropriate. Ex: The user should not be able to choose an option that doesn't exist or delete a player that doesn't exist. The roster should be kept in alphabetic order by the players' full names. Ex: If Alice Chang (9) is added to a roster with Jake Smith and…Programming Language: Java Direction: Write a program to determine the number of PASSED and FAILED out of 15 inputted names with the corresponding grade. Restrict the inputted grade for each name in the range of 50 to 100, in which 75 is the passing grade. If the inputted grade is not on the range, the program will remind the user of a message for the accepted range for the grade and allows the user to re-enter a grade. NOTE: MUST ADD COMMENTSJava Language The company will held its quarterly performance for each department; wherein each group of the department are rated from 1 to 5, where 1 is the lowest score and 5 is the highest score. The department has two groups, groupA and groupB. Each group will be rated by five evaluators. Create a program that will ask for the input rate of the evaluators, and determine the group that got the highest rating, as well as the overall rating of the department. Use the UML diagram below as a reference. Department() – accepts 5 ratings of the evaluators and determines the groupScore which is the total rating of the group. getGroupAverage() – returns the value of groupAverage which is the average score of the group. displayAverage() – displays the overAllAverage which is the average of the whole department. overAllScore is the over all score of the department. Department Group Score: Int Group Average : Double Overall Score: int overall Average: double Department()…
- C++ Create a program for a new school where it promps the user for a student number in the school and data about the student, including the awards, suspensions, and disciplinary violations. there are 22 student numbers in the school. Display a prompt if the lot is already taken.it should display the A. name of the user, student numberB.check if the student number is takenC. compute for total tuition fee, which is a 60,000 base price plus 27,000 for each award, 32,500 for each suspension, and 8,000 for each disciplinary violation.Accepts student numbers and display the needed outputs until user exits the programSOLVE IN C# Canada Government has announced 250 immigration visa lottery for third world countries. Total number of Application collected 10000, starting from application number 1 to 10000. You are required to write a program for Canadian government to select 250 visa for lottery visa, randomly from the pool of 10000 application and print the application number on screen Note: No input required in this programFox International sells pre-paid calling card with the following features: Calls to USo 1.2 cents per minute plus a 49 cent connection fee per call Calls to Europeo 2.3 cents per minute plus a 49 cent connection fee per call Calls to Australiao 6.4 cents per minutes plus a 49 cent connection fee per callWrite a program that work out the charges for the month. The program should accept the followinginformation: Account holders name Card number Starting Balance on card For US callso Total number of minutes of all callso Total number of calls made For European callso Total number of minutes of all callso Total number of calls made For Australian callso Total number of minutes of all callso Total number of calls madeYou are NOT expected to error check your inputs for this assignment. (e.g. checking for negative values,etc.). There is NO GST charged on the calls as the GST was paid when the card was purchased.Format of output:Review the test plan to see how the user would like the…
- Use C Language Airline Reservation System A small airline has just purchased a computer for its new automated reservations system. The president has asked you to program the new system. You are to write a program to assign seats on each flight of the airline's only plane (capacity: 10 seats). Your program should display the following menu of alternatives: Please type 1 for "first class" Please type 2 for "economy" If the person types 1, then your program should assign a seat in the first class section (seats 1-5). If the person types 2, then your program should assign a seat in the economy section (seats 6-10). Your program should then print a boarding pass indicating the person's seat number and whether it is in the first class or economy section of the plane. Use a single-subscripted array to represent the seating chart of the plane. Initialize all the elements of the array to 0 to indicate that all seats are empty. As each seat is assigned, set the corresponding elements of…Air Pacific Limited, Fiji's international airline, operates international and domestic services around the Pacific and to North America and Hong Kong. It has its head office at the Air Pacific Maintenance & Administration Centre in Nadi. You are required to write a program that passengers can use to chose seats for aircraft FJ501. The aircraft has 13 rows with 5 seats in each row. Rows 1 to 4 are first class, the remaining rows are economy class. The program should display the seating plan for the aircraft. Empty seats are shown with x and the seats that are booked will have the passenger name (first name plus initials of other names) on it. To reserve a seat, they have to provide their ticket type (First Class or Economy Class), the seat they prefer and their name (first name plus initials of other names). The program verifies that the seat is empty then only bookings are done. Passengers are also allowed to check the seats they are booked for by providing the passenger name (first…Python Programming Create a program that allows user to enter student names and scores, the program is to also allow defining the subject the grades are being entered for. The entered information is to be stored in a DataFrame. First, the program is to ask user how many tests are the grades for. If 3 entered for instance, the program is to ask user to enter test names. Next, the program is to ask the user the number of students they would like to enter grades for. Then the program is to ask user to enter dictionary information as following: Student Name List of grades (3 grades minimum) An example of the outcome is shown in the following picture: