PART A. Write a program Is Divisible that reads two integers from the user and determines if one is divisible by the other. Here are several examples: Enter two integers, I'll check if one is divisible by the other: 9 4 9 and 4 are not divisible Enter two integers, I'll check if one is divisible by the other: 15 5 15 is divisible by 5 Enter two integers, I'l1 check if one is divisible by the other: 5 15 15 is divisible by 5
Q: 2. Write a simple payroll program that will display employee's information. The program should…
A: pay roll program that will display employee's information
Q: Write a program that does the following: 1. prompts the user to enter a word 2. using that word,…
A: To Do: To write the C++ Code.
Q: Write a program that asks the user for the number of adult and the number of child movie tickets…
A: Answer :- #include <iostream> #include <iomanip> using namespace std; int main() {…
Q: Modify the following program so it can add two numbers between the values 0 and 9. The current…
A: The working program is written in the second step
Q: Write a program that calculates and prints the amount of wages due to an employee for a week's work.…
A: C++ program to calculate the amount of wages due to an employee for a week’s work. Prompt the user…
Q: Write a program that reads maximum 100 integers entered by user ranging from 1 to 9 and displays the…
A: Here is the python program for above implementation. See below step.
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: A county collects property taxes on the assessed value of property, which is 60 percent of its…
A: Step 1: Prompt and accept property value from the user. Step 2: Prompt and accept tax rate per $100…
Q: Write a program that asks user to enter a number until user enters -1. Then the program should…
A: Since you have not mentioned programming language I'm doing this in c++.
Q: لغة اسمبلي 1- Write a program to read a letter in lower case then convert this letter to upper case…
A: 2.
Q: Write a program which calculates the balance of a savings account after the first three months. To…
A: The question has been succesfully solved with Screenshot of code and output with 100%…
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: 1. Write a program to find the square of two numbers 10, -4. 2. Write a program to find the square…
A: 1. Sample Response: #Python3 program#function to print teh square of 10 and -4def printSquare():…
Q: 1. Write a program that reads an integer from the user. Then your program should display a message…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: Write a program that reads in two numbers a and b. The program should calculate the following…
A: The above program calculate a2 using the pow function in c++. Square root can be find using the sqrt…
Q: Write a program that prompts the user to enter a nonnegative integer and outputs the factorial of…
A: #include<iostream> using namespace std; int main(){ int number; cout << "Enter a…
Q: In this exercise you will create a program that reads a letter of the alphabet from the user. If the…
A: In this program Get the input alphabetical letter from the user Using if statement check the entered…
Q: 1. Create a program that asks for a distance in kilometers and converts it into its metric…
A: /*C program to ask distance in kilometers and converts it into its meter equivalent*/ #include…
Q: Write a program that does the following: 1. prompts the user to enter a word 2. using that word,…
A: Code: Output:
Q: Exercise 30 defines the number e and Exercise 31 shows how to approximate the value of e using a…
A: Since no programming language is mentioned. I am attempting this in python. if you need it in any…
Q: Your relative, who goes to primary school and has just learned the multiplication table, asks you to…
A: using System; public class Multiplication { public static void main() { int i,n,count=0;…
Q: PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For…
A: Python program to fid the number of days elapsed
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both…
A: Program code: //include the required header file #include <iostream> #include…
Q: Write a program that prompts the user to input three numbers. The program should then output the…
A: The given is the requirement to solve the problem in C++ programming lanague where: a) User will…
Q: Write a program that asks the user for three numbers and print the numbers in either ascending or…
A: n1 = float(input("Enter number a: "))n2 = float(input("Enter number b: "))n3 = float(input("Enter…
Q: Write a program that prompts the user to input three numbers. The program should then output the…
A: #include<iostream> #include<algorithm> using namespace std; int main(){ cout…
Q: Using c++ Madison County collects property taxes on the assessed value of property, which is 60…
A: #include<iostream>#include<iomanip>using namespace std;int main(){double propertyValue,…
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: ****************** Maths used to calculate the total cost ***************** miles/per states that…
Q: Solve the problem of finding the average value, the highest value, and the lowest value from a…
A: Algorithm: Start Read a number n Set max to Integer.MIN_VALUE and min to Integer.MAX_VALUE…
Q: 4. Write a program that computes the employee's payroll of ABC Company. The user is first asked to…
A:
Q: Write a program that calculates the total grade for N classroom exercises as a percentage. The user…
A: C++ is just an object oriented programming language not only based on objects but also based on…
Q: PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For…
A: Answer: Algorithms first import inbuilt module form date take input form user like MM,DD,YYYY as in…
Q: 3. Write a program to read 20 integer numbers, each number consist of 3 digits, then find the number…
A: // Taking 20 numbers of three digits and storing them to a list numbers = [] for i in range(20):…
Q: Write program to print all the numbers divisible by 4 and 5 up to a number of
A: Approach For instance, if N = 20 is set as either a restriction, the program must report any values…
Q: e to 10 decimal places is 2.7182818285 Write a program that prompts the user for a number of decimal…
A: C++ Code: #include <iostream>#include <iomanip>using namespace std; int main() { //…
Q: 3. Write a program that will input non-negative integer and would display the prime factors of the…
A: Here is the approach to achieve this :- Get the input from the user and call the prime factor…
Q: Write a program that asks for the starting time and the number of minutes of the call, and displays…
A: The total cost of the call is calculated based on the duration of minutes.
Q: Write a program that performs as a very simple calculator. Your calculator should be able to handle…
A: GIVEN: Write a program that performs as a very simple calculator that handles the four basic math…
Q: Write a program that invites the user to enter two numbers: a dividend (the top number in a…
A: According to the Question below the Solution: Output:
Q: Write a program that does the following: 1. prompts the user to enter a word 2. using that word,…
A: Here I have taken input from the user and stored it into a variable of type string. Next, I have…
Q: PYTHON write a program that assigns the principal amount of P10000 to variable P, assign to n the…
A: We are going to write a PYTHON code which will find out the total amount which will be compounded…
Q: Q1: Write C++ program to read two integer numbers then print “multiple” or “not” if one number is a…
A: Note: Multiple questions are given in one part. According to the rule, you will get the answer for…
Q: Write a program that converts temperature from Fahrenheit to Celsius and vice versa.
A: Dear Student below is the Java code provided for Fahrenheit to Celsius and vice versa conversion.
Q: 2. Write a program to read a number. If the number is a multiple of 3, then enter three new numbers…
A: Question 2 is given below
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: Write a program that can determine the number of days in a month for a specified month and year. The…
A:
Q: 3)Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: Note- As per our guidelines we are supposed to answer only one question(first) if there are multiple…
Q: 6) Write a program that prompts the user to input a number. The program should then output the…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program that asks the user to enter a positive integer, as in the examples below. If the…
A: while True:#infinite loop is used, so that it can run until proper input is given try: n =…
/////////////
////////////
////////////
the language used is java
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 5 images
- Write c ++ a program to determine the number of thousands, hundreds, tens, and ones in a given integer number (You can use integer division and modulus). For example, if you entered 8532, the program will print 8 thousands, 5 hundreds, 3 tens and 2 ones. Then, let the program to print the number on the screen in reverse way as 2358 and print its double as well (2* 2358) 4716.Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the number of hydrogen, carbon, and oxygenatoms in the molecule. The program should prompt the user to enter thenumber of hydrogen atoms, the number of carbon atoms, and the numberof oxygen atoms. The program then prints the total combined molecularweight of all the atoms based on these individual atom weights:Atom Weight(grams I mole)H 1.00794c 12.01070 15.9994For example, the molecular weight of water (H20) is: 2(1.00794) +15.9994 = 18.01528.Write a program that invites the user to enter two numbers: a dividend (the top number in a division) and a divisor (the bottom number). It then calculates quotient and remainder using / and % operator and displays the result. After one iteration it asks user whether he/she wants to do more (Y/N). (C++ show input and output as well)
- 1. Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours in a week.For example, if a person’s hourly wage is $12 and he or she works 60 hours in a week, the person’s gross pay shouldbe (40 *12) + (1.5 *12 * (60-40)) = $840.Write a program that requests the floating number of hours a person works in a given week and the person’s hourlywage as input, and then displays the person’s gross pay. Save it as overtimePay.pywrite a program that allows two numbers from the user and prints all the numbers that are multiplications of three. which are within these two numbers (not inclusive). The user can enter these two numbers in any order. Here are some examples of the output for such a program.Python Write a program that receives a number from a user and checks if it's float or integer.In case of being float, print for the user that his/her number is float with integer part andfractional part. In case of being integer, print to the user that his/her number is aninteger and odd/even numbeR
- PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For example, 07 26 1998. The program will print the number of days elapsed from 01 January of that year, i.e. January 1st is always 1 and December 31 is either 365 or 366, depending on if leap year or not. SPECIFICATIONS: - You may only use the codes that we studied under our lectures - All lines of codes should have a comment. - Save your cpp file as TEST CASES: If a user inputs a valid int month, date, and year: Enter MM: 05 Enter DD: 18 Enter YYYY: 1995 Result: 138 days If a user inputs an invalid int month, date, and year: Enter MM: 02 Enter DD: 29 Enter YYYY: 1997 Result: INVALIDWRITE A PROGRAM TO CALCULATRE THE AREA OF A RECTANGLE OF LENGTH =5 CM AND BREADTH=8CM. CALCULATE THE PRICE OF AN ITEM COSTING 100 GHANA CEDIS AFTER A DISCOUNT OF 10% IS APPLIED TO IT. WRITE A PROGRAM TO CALCULATE THE SIMPLE INTEREST ON A LOAN AMONUT OF 50000 GHANA CEDIS AT AN INTEREST RATE OF 30% FOR A NUMBER OF YEARS WHICH WILL BE SPECIFIED BY THE USER. WRITE A PROGRAM TO CALCULAT THE AGE OF THE USER AFTER THE USER ENTERS HIS OR HER YEAR OF BIRTH.Here is a classic “introduction to computer programming” problem: Write a program that converts temperature from Fahrenheit to Celsius and vice versa. The program will accept a number (temperature) and a temperature unit designation (i.e., character F or C) from the user, and then convert the temperature into the other unit system. The program will echo the input as part of the final conversion output. The temperature units should be printed in full (Fahrenheit or Celsius). Your program should use real numbers—not integers—for both input and output. Formula: T(F) = (T(C) * 9 / 5) + 32T(C) = (T(F) − 32 ) * 5 / 9 Sample Run: This program converts Temperatures from Fahrenheit to Celsius and vice versa. Please enter your temperature: 32 Please enter the units (F/C): F A temperature of 32 degrees Fahrenheit is equivalent to 0 degrees Celsius. Do you wish another conversion? (Y/N): Y Please enter your temperature: 100 Please enter the units (F/C): C A temperature of 100 degrees Celsius is…
- Write a program that asks the user for three numbers and print the numbers in either ascending or descending order according to the user's choice. Forexample, Enter number a: 3Enter number b: 1 Enter number c: 6 Ascending order (Y or N): y In ascending order: 1.00, 3.00, 6.00 or Enter number a: 4Enter number b: 5 Enter number c: 9 Ascending order (Y or N): NV In descending order: 9.00, 5.00, 4.00 Requirement: This program should contain only one print() statement. You should build the output using string concatenation.Write a program that reads a four-digit integer, such as 2014, and then displays it, one digit per line in reverse order, like so: 4 1 0 2 Your prompt should tell the user to enter a four-digit integer. You can then assume that the user follows directions. (Hint: Use the division andm remainder operators.)Write a program that asks the user to enter a month (1 for January, 2 for February, etc.) and thenprints the number of days in the month. For February, print “28 days”.Enter a month: 530 days