Write a program that asks the user for two integers; assume the second integer is larger than the first. Then print a table similar to the one below. As an example, suppose the user entered 8 and 13. The table would look like: Number Square Square Root === == 8 64 2.82843 9. 81 3.00000 10 100 3.16228 11 121 3.31662 12 144 3.46410 13 169 3.60555
Q: Write a program that reads a four-digit integer, such as 2014, and then displays it, one digit per…
A: Program Approach: Create an empty list. Declare a user input integer variable for taking the…
Q: Write a program that reads from the user two integers of three digits each. The program finds the…
A: import java.util.*;public class Main{ // to display the digits of number separated by space public…
Q: Write a small game in Python: The user thinks of a natural number from 1 to 1000. The computer tries…
A: As per guidelines we can answer only one question so for answer of other questions please ask…
Q: Write a program that asks the user for a word, then prints out the word once on the first line,…
A: Algorithm: Input word from user Append a space to the input word Iterate a for loop for variable i…
Q: Write a program that converts numbers to words. For example, 895 results in "eight nine five."
A: Below is the required C++ code. Program Approach: Include necessary header files and use a…
Q: Write a program that generates and prints 50 random integers, each between 3 and 6. Write a program…
A: 1)Code: as you have not mentioned the coding language i am giving the code in java class Main {…
Q: Write a program that displays the following two tables side by side (note that 1 kilogram is 2.2…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
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 prompts the user to enter the minutes (e.g., 1 billion), and displays the…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED JAVA FOR THE SOLUTION. Define…
Q: Write a program that sum up all prime numbers within the range of 0 and 1000.
A: Sample Response: #Python3 program to find teh sum of all prime numbers between 0 and 1000def…
Q: Write a program that calculates a “moving (rolling) average” of ten integer numbers entered by the…
A: We need to write a Python code to find moving average.
Q: Write a program that asks the user for his name and salutes him using it. The prompt must be "What…
A: According to the Question below the solution: Output:
Q: Write a program to find the smallest positive integer that satisfies the following property: If you…
A: Given: Write a program to find the smallest positive integer that satisfies the following property:…
Q: A Fibonacci sequence is a sequence of numbers where each successivenumber is the sum of the previous…
A: We need to find the nth Fibonacci number where the n is the value given by user
Q: Write a program that asks the user to guess a random number between 1 and 10. If they guess right,…
A: Program: # initialize the score to 0 score = 0; # the number to guess is 5 number = 5; # run the…
Q: Java, a real estate office handles 50 apartment units. When rent is $600 per month, all the units…
A: Actually, java is a object oriented programming language.
Q: Write a program that plays a number guessing game with a Human user. The Human user will think of a…
A: // do comment if any problem arises //code #include <iostream> using namespace std; //this…
Q: Write a program that converts a given number of minutes into hours:minutes:seconds format. For…
A: C++ Program for above : #include <iostream> #include <iomanip> using namespace std;…
Q: In this program you will ask the user for 4 integers that represent two fractions. First ask for…
A: 1. Declare variables to store numerator and denominator of all the three numbers. 2. Input Numerator…
Q: Write a program that calculates the number of hours, minutes, and seconds in N seconds. Example: In…
A: The above question is solved in step 2 :-
Q: Write a program to get a random number between 1 and 100, use the button to check whether the given…
A: write a program to get random number between 1 and 100......
Q: Write a program that checks to see if the user won the lottery. Assume the winning lottery numbers…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Store the given…
Q: Write a program that asks the user for two integers that will correspond to the numbering of the…
A:
Q: Write a program that prompts the user to enter an integer and prints the value of the following…
A: Here is the java program. See below steps
Q: Write a program that reads a four-digit number from user, then the program separates digits of the…
A: code
Q: Write a program that takes 7 numbers from the keyboard, count the positive numbers, sum the positive…
A: Below is the required code in C++ language. Approach to Program: Include a necessary header files…
Q: You have to write a program to find the largest number and its place. For example, if the values are…
A: The following are steps needs to be taken for the given Python program: In the function, findMax()…
Q: Python program that will ask a user for a number, then determine whether it is a prime number or no
A: Write a Python program that will ask a user for a number, then determine whether it is a prime…
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 to determine the number of thousands, hundreds, tens, and ones in a given integer…
A: Code: #include <iostream>using namespace std; int main(){ int thousands, hundreds, tens,…
Q: Write a program that reads in three numbers from the keyboard and then prints those numbers in…
A: Two questions are asked. So the only the first question will be answered. Please upload another…
Q: Write a program that will help you to learn multiplication. The program prompts the user to enter…
A: As there is no programming language mentioned in this question so program is attempted in c++…
Q: Write a program that reads an integer and prints how many digits it has by checking whether the…
A: NOTE Below is the program for the given question. Hope you understand it well. If you have any…
Q: Write a Python program that asks the user for one number and tells if it is a prime number or not.…
A: num = int(input("Enter the number: "))if num > 1: # Iterate from 2 to n / 2 for i in…
Q: Write a program that asks the user for a negative number, then prints out the product of all the…
A: Solution: Since any specific language for the above question is not mentioned, we have solved…
Q: Write a program that reads 6 integers and displays the largest and the smallest amongst those…
A: C++ code: To displays the largest and the smallest amongst 6 integers #include <iostream>using…
Q: Write a program that takes 7 numbers from the keyboard, count the positive numbers, sum the positive…
A: Below is the required code in C++ language. Approach to Program: Include a necessary header files…
Q: Write a program that calculates the total grade for N classroom exercises as a percentage. The user…
A: Program: //include the header file #include<iostream> #include<iomanip> using namespace…
Q: Write a program that asks the user for two integers; assume the second integer is larger than the…
A: EXPLANATION - In this program we will declare two variables named with n1 and other is n2 . Then…
Q: Write a program that displays the following table (notethat farenheit = celsius * 9/5 + 32):Celsius…
A: Note: Since it is not mentioned which programing language to be used so i prefered to use java…
Q: Write a program that asks the user his/her name(first letter), semester, mlarks, and age and then…
A: Code : import java.util.*;class input{ public static void main(String[] args){ Scanner input = new…
Q: Write a simple LMC(little man computer) program that requests the user to input 2 numbers (say, Aand…
A: Program: INP STA M0 INP STA M1 SUB M1 BRP J1 LDA M1 J1 LDA M1…
Q: Write a Java program that prompts the user to enter a monthly saving amount and displays the account…
A: Approach Use for loop iterating from 1 to 12 for computing account value after each month. The…
Q: Write a program that helps the user count his change. The program should ask how many quarters the…
A: Java program is asked for the given requirements.
Q: a program that reads from the user two integers of three digits each The program finds the sum of…
A: import java.util.Scanner;public class MyClass { public static void main(String args[]) {…
Q: Write a program that will compute and display the sum of the factorials of the numbers from 1 to n,…
A: Start Enter number Calculate factorial of number from 1 to n display stop
Q: Write a program to find two points that are nearest to each other. For example, points (1, 1) and…
A: I have added the comments. I have also added the screenshot. The class name is Test. So the commands…
Q: For Homework, Create a Program that draws from a deck of 52 cards For those who do not know a deck…
A: I have implemented the code as per the specifications. The code is as follows:…
Hi, I need to answer this question using the C++
Note: I have included a copy of the General Program Format Rules.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- Please use Visual Studio or Xcode to create a program that asks user giving you the amount of money customer has spent, your program will determine how much percent of discount the customer will receive: If the amount is more than $300, the discount is 30%; If the amount is more than $200 but less than $300, the discount is 20%; If the amount is more than $100 but less than $200, the discount is 10%; If the amount is less than $100, the discount is 5%; Based on the inputted amount value, your program will print out. the discount percent, the discount amount, the invoice total You will be using C++ for this programPlease use Visual Studio or Xcode to create a program that asks user giving you the amount of money customer has spent, your program will determine how much percent of discount the customer will receive: If the amount is more than $300, the discount is 30%; If the amount is more than $200 but less than $300, the discount is 20%; If the amount is more than $100 but less than $200, the discount is 10%; If the amount is less than $100, the discount is 5%; Based on the inputted amount value, your program will print out the discount amount . using C++Please use Visual Studio or Xcode to create a program that asks user giving you the first_name, last_name and the middle initial. Your program will print out your name in two formats: (1) last_name, first_name (2) first_name middle_initial last_name. using C++
- Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylindrical containers. The shipping charges depend on the amount of the liquid in the container. (For simplicity, you may assume that the container is filled to the top.) They also provide the option to paint the outside of the container for a reasonable amount. Write a program that does the following: Prompts the user to input the dimensions (in feet) of the container (radius of the base and the height). Prompts the user to input the shipping cost per liter. Prompts the user to input the paint cost per square foot. (Assume that the entire container including the top and bottom needs to be painted.) Separately outputs the shipping cost and the cost of painting. Your program must use the class cylinderType (designed in Programming Exercise 3) to store the radius of the base and the height of the container. (Note that 1 cubic feet = 28.32 liters or 1 liter = 0.353146667 cubic…A. The regular expression/\b\$\d+/gwill match words beginning with a dollar sign and one or more digits, such as"$5"or"$500". Select one: True False B. Given that you can calculate the circumference of a circle by multiplying its diameter times pi, in JavaScript you can use the statement circumference = d * Math.PI;to calculate the circumference of a circle with the diameterd. Select one: True FalseAny help with this first problem would be really helpful! Thank you so much!! Please display a screenshot of the code so I see the correct format and learn the proper way. Thank you!! 1. Write the following exercise using Java code. Add comments in each program to explain what your code is doing. Write a program that generates a two-column table showing Fahrenheit temperatures from -40F to 120F and their equivalent Celsius temperatures. Each line in the table should be 5 degrees F more than the previous one. Both the Fahrenheit and Celsius temperatures should be accurate to 1 decimal place.
- ****Microsoft Visual Studios (C++)**** Write a program that will do the following: Run continuously until the user gives a command to quit Ask the user if they want to calculate the area of a circle, square, or triangle. Based on response will ask the user for the appropriate quantities then display the area to the user.In PyCharm, write a program that prompts the user for their name and age. Your program should then tell the user the year they were born. Here is a sample execution of the program with the user input in bold: What is your name? Amanda How old are you? 15 Hello Amanda! You were born in 2005. Hello Amanda! You were born in 2005. Write the program. Format your code using best practices. Refer to the zyBooks style guide, if needed, to use proper naming conventions for variables and methods. Use the most appropriate statements with minimal extraneous elements, steps, or procedures. Run the program. Debug the program. Be sure your code produces the correct results. Save and submit your file.Please take screenshots of the stops. (Science: calculating energy) Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to compute the energy is Q = M * (finalTemperature – initialTemperature) * 4184 where M is the weight of water in kilograms, temperatures are in degrees Celsius, and energy Q is measured in joules.
- Create a basic calculator that will get the sum, difference, product and quotient of two numbers entered by the user. (Be creative).Create a C++ console project in Visual Studio or another tool. Create an application that converts a student’s grade percentage to a letter grade following the rules below: Grade Percentage A 100-90 B 89-80 C 79-70 D 69-60 F 59-0 Your code should prompt for and get the student’s percentage as input, and output an error message or a letter grade. Note: Your code should test these cases: Percentages less than 0 – error message. Percentages greater than 100 – error message. Percentages in the range 0-100 – letter grade. Please make sure your code can handle these cases. Tips: Use operator and ‘||’ for the conditional control statement. Use instruction ‘if’ for conditional control. Make the following edits to the code file: Complete the header comment. 2) Declare two double variables: grade and percentage. 3) Assign the value of percentage from input. 4) End program if percentage is smaller than 0 and…Please help me with this using java. Explain each line of code using comments