Construct a program which asks user to enter an integer number and output the table of that number in the following format (for example user enters 2): • 2*1=2 • 2*2= 4 (So on.)
Q: Write a program that prompts the user to enter four integersand then displays all possible ways of…
A: Since, here no programming language is specified. So, we are providing the solution in Java. The…
Q: This is a segment of program, when it executed with multiple values for n and s the program displays…
A:
Q: A factorial of N is defined as 1 if N is O or 1, and 1*2**N if N is a non-negative integer. Write a…
A: note:- only one program will be solved if they are not linked . Also mention programming language…
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 asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Program Explanation: Declare the header files Declare and define the function to compare two…
Q: Write a program that prompts the user to enter a positive integer and obtains its square root in…
A: Given data is shown below:
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: A positive whole number n > 2 is prime if no number between 2 and n (inclusive) evenly divides n.…
A: import mathn=int(input("Enter n value: "))count=0for i in range(2,int(math.sqrt(n))): if n%i==0:…
Q: Write a program, which: inputs 50 numbers outputs how many of the numbers were > 100 langiage C#
A: #include <stdio.h> int main(){ int x, i, sum=0; x=0; int A[50]; printf("Input 50…
Q: Suppose that the rent for an apartment is $1000 this year and increases 3% every year. Write a…
A: Summary: In this question, we have been given one statement and we have to code it. We have given…
Q: Write a program that prompts the user to enter an integer and prints the value of the following…
A: Below I have provided Java Programming. Also, I have attached the screenshot of the code and output…
Q: Write a program that reads two integers, a and b, from the user. Where a is equal to 17 and b is…
A: Note: Below is the required program in the python language. Program Approach: Ask the user to enter…
Q: Write a program that asks the user for a number, and multiplies it by 3 then prints out the result:…
A: Start Prompt the user for input Parse it as integer Multiply the number by 3 Print the result Stop
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: Create a program that reads two integers, a and b, from the user. Your program should compute and…
A: #asking user for inputa=int(input("Enter a number "))b=int(input("Enter a number "))#find…
Q: Write a program to display a prime numbers between 1 and 1000.
A: Since the programming language is not mentioned, we'll do it in python The programming methodology…
Q: Write a program that asks the user to input 10 numbers and counts how many odd numbers that user…
A: Algorithm:- (I) declare array of size 10. (II) using loop take input . (III) use modulo 2 to…
Q: Write a program that reads at most 100 integers between 1 and 100 and counts the occurrence of each…
A: C program is given below:
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 asks the user for a number and prints out 100 divided by the number: Enter a…
A:
Q: Write a program that prompts the user to read two integers and displays their sum. Your program…
A: import java.util.InputMismatchException; import java.util.Scanner; public class Exercise_02 {…
Q: 1. Make a program to accept two integers X and Y, then compute the difference. If X-Y is Negative,…
A: The Answer is
Q: Write a program that reads in loan amount, annual interest rate and number of years for the loan and…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program that prompts the user to enter a four-digit integerand displays the number in…
A: Given: Write a program that prompts the user to enter a four-digit integer and displays the…
Q: *Write a program that asks the user to guess your favorite number. The program should end when the…
A: Guessing a number will be done by using loop. IN the python programming language there are three…
Q: Write an algorithm that asks the user to enter an integer number then prints the sum of even digits…
A: Aim: To create a program that print addition of all the odd digits of a number and even digits of…
Q: Write a program in python to find the factorial of number and sum of digits if number..If the…
A: Program approach - Prompt user to enter the number. IF the number is less than equal to 10, then…
Q: What is the output of the following program: PROGRAM EXAMPLE (output); VAR A, B, C, D: integer;…
A: The key to understanding what this program does is understanding the difference between calls by…
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: This is a segment of program, when it executed with multiple values for n and s the program displays…
A: #include<iostream>using namespace std;int main(){ int x,y,f; cin>>x>>y;…
Q: Write a program that displays the following table (note that 1 mile is 1.609 kilometers):Miles…
A: Given: Program that displays the following table (note that 1 mile is 1.609 kilometers)
Q: Write a program to read 2 numbers. Display the greatest of all.
A: PROGRAM CODE: #include <iostream> // include header file for input output…
Q: In a program, write the program's algorithm that calculates the sum of odd integers (T1) from 1 to…
A: Algorithm Create two threads T1, T2 & T3 using the below syntax, where T1, T2 & T3 are used…
Q: Add a print statement to say “Multiplication Table” and then prompt the user to enter an integer.…
A: Here we need to compute the multiplication upto the number entered by user. So, this can be done…
Q: Write a program that asks the user for a number, and divides it by 2 then prints out the result:…
A: As per the requirement here I am providing the code. Here is the algorithm. Step 1: Start Step 2:…
Q: need this answered in c++
A: #include <iostream> using namespace std; int main() { int a,b,c; cout<< " Enter…
Q: Question 1: Write a python program that takes two numbers (Integer) as inputs from the user.…
A: One program is asked in python programming language. Program prints one pattern using two inputs,…
Q: Write a program that shows the numbers up to the entered number that are divisible by 6 but not…
A: Here I have first of all asked the user to enter a number and stored it into a variable num. Now I…
Q: Write a program to enter a value of x and compute the value of y where x if x 20 -x if x<0 y=
A: I have provided C CODE along with CODE SCREENSHOT and 2 OUTPUT…
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 that asks the user to enter a signed number and read it. Then display the content of…
A: Note: Since no language is mentioned # Input the number sign = int(input('Enter the signed number…
Q: In Python write a program to read two integers num1 and num2 from user and print the value of…
A: Dear learner , hope you are doing well!, I will try my best to answer this question. Thank You!!
Q: Write a program that asks the user for a number and prints out the factorial of that number.
A: Please find the answer below :
Step by step
Solved in 4 steps with 1 images
- Question # 1: Write a program that inputs age in years and displays age in days and months Question # 2: Write a program that inputs two times in hh:mm:ss format, adds both times and displays the total time. Question # 3: Write a program that inputs salary and grade, It adds 50% bonus if the grade is less than 15 and 25% bonus if the grade is above. Display basic salary, bonus and net salary.3)Write a program which prompts the user for their age. If they are 19 or younger inform them that qualify for student discounts. If they are between 20 and 65 inform them that they qualify for no age discounts. If they are 65 or over inform them that they can receive senior discounts. (solution will be Pyhton code,thank you)4)Write a program from decimal to any base, ask the user for a decimal number and convert entered base by user. (Your program should support bases between 2 and 16 .) (solution will be Pyhton code,thank you)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.py
- 30 Suppose a, b, and sum are int variables and c is a double variable. What value is assigned to each variable after each statement executes? Suppose a = 6, b = 3, and c = 2.2. (14) a b c sum sum = static_cast<int>(a + b + c); __ __ __ __ b += c * a; __ __ __ __ c -= a; __ __ __ __ a *= 2 * b - c; __ __ __ __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)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.
- IN PYTHON Write a function that will prompt the user to enter a nonnegative integer, assign the integer to variable n. The function will generate, calculate and display the average of n random integers between 7 and 20, inclusive.a. Write a program that takes integers as arguments and adds them.b. Write a program that takes integers as arguments and multiplies them.c. Write a program that takes integers as arguments & adds & multipliesthem using the above two programs.C++ Write a program that prompts the user to enter the number of students and each student's name and score. and finally displays the name and score of the student with the highest score and the average score.
- 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 in R that asks the user to enter two numbers then perform 5 mathematical operations on the two numbers: Addition, Subtraction, Multiplication, Division, and Average. The program should display All the results.3.2.2: Read and format integers. Jump to level 1 First, read in an input value for variable inputCount. Then, read inputCount integers from input and output each integer on a newline followed by the string " entries.". Ex: If the input is 3 35 5 90, the output is: 35 entries. 5 entries. 90 entries. #include <iostream>using namespace std; int main() { int inputCount; int i = 0; for (i = 0; i < 4; ++i) { cin >> inputCount; cout << inputCount << " entries." << endl; } return 0;} Input 3 35 5 90 Your output 3 entries. 35 entries. 5 entries. 90 entries. Expected output 35 entries. 5 entries. 90 entries. clear2: Compare outputkeyboard_arrow_up Output differs. See highlights below. Special character legend Input 1 100 Your output 1entries.100 entries. 100entries.100entries. Expected output 100 entries. clear3: Compare outputkeyboard_arrow_up Output differs. See highlights below.…