Here is the assignment
Write a
Then, ask the user to tell where in the table the incorrect number is located by entering the row and column of the incorrect number. Print whether the user was right or not. If he or she was right, ask for and read the correct value; if not, the program must give the correct location and the correct number.
My main issue: is how to set up the multiplication table? I've only learned the basics in C++ (loops and if statements).
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
- Write a program named Fibonacci that prints the Fibonacci sequence of numbers. The first two numbers in the Fibonacci sequence are 1. Every other number in the sequence is the sum of the two previous numbers. Your program should prompt the user to enter a limit; the program will stop when the current number in the sequence is greater than or equal to this limit. Here's what the user will see when the program is executed: This program prints the Fibonacci sequence Enter a limit on the largest number to be displayed: 50 1 1 2 3 5 8 13 21 34arrow_forwardWrite a program that prompts the user to assign an integer value for A, B, and C then use the switch statement to allow a user to select and perform the following operations 1. Sum – performs addition of A, B, and C. 2. Mean – computes the average of A, B, and C. 3. Sort – arrange A, B, and C in increasing order. 4. Exit – exits the program.arrow_forwardWrite a program that generates a random integer N between 0 and 20 (included). Then it will ask the user continuously to enter a value V between O and 20. • If the V is equal to N the program displays "you win!!" and ends • If the difference between V and N is equal or greater than 12 the program dispiays "Very Cold" • If the difference between V and N is less than 12 and equal or greater than 6 the program displays "Cold" • If the difference between V and N is less than 6 and equal or greater than 3 the program displays "Hot" • if the difference between V and N is less than 3 the program displays "Very hot" The program ends if the user guess the correct number or if he enters 10 wrong numbers. If the user enters 10 wrong numbers the program displays "You lost" and the correct number. Hint: To compute the difference between V and N use Math.abs(V-N) Using java Runi Enter a number between 0 and 20:5 Very hot Enter a number between 0 and 20: 10 Run2 Enter a number between O and 20: 15…arrow_forward
- Write a program that displays all possible combinations for picking two numbers from integers 1 to 7. Also display the total number of combinations.arrow_forwardWrite a program that prompts the user to enter two inputs: some text and a word. The program outputs the starting indices of all occurrences of the word in the text. If the word is not found, the program should output “not found”. Example1:Input1: my dog and myself are going to my friend Input2: myOutput: 0 11 31Example 2:Input1: Programming is funInput 2: myOutput: not foundarrow_forwardWrite a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a divisor (denominator). Your program should then divide the numerator by the denominator, and display the quotient followed by the remainder.arrow_forward
- Write a program that prompts the user to input any digit then swap the position of the first and the last digit. Next, the user will be prompt to select what arithmetic operation he/she want to employ on the first and last digit based on the following choices: 1. Sum of their square 2. Product of their square root 3. Square of their product The output will display the result of the arithmetic operation followed by the digit with a swapped position of “first” and “last” digit. Then finally display the equivalent uppercase alphabet for the first digit and lowercase alphabet for the last digit respectively after swapping. Note: 1. If the last digit of the inputted digit from the user is zero, it must display that there is no equivalent alphabet for that digit. 2. If the user chooses arithmetic operation No.2, format the output to three decimal places TEST CASES: If a user inputs a digit and choose arithmetic operation No.1: Input any number: 97834 Select an arithmetic operation…arrow_forwardkindly change the program following the procedure on the problem. please list the changes you have made on the program t..thank youarrow_forward4. Randomly generate an integer number in range [10, 99]. Check if the digit at 10°s position is greater than the digit at 1's position. If yes, swap these 2 digits to generate a new number. Display original number and new number. For example, if the number is 43, after process, the new number will be 34. If original number is 12, no process needed. If the number is 50, the new number will be 5arrow_forward
- Write a program that asks the user to enter an integer consisting of 4 digits only, and check how many even number (s) is in its digits. Sample run 1: Enter a number with four digits: 547 Your number is less than 4 digits. Sample Run 2: Enter a number with four digits: 56597 Your number is more than 4 digits. Sample Run 3: Enter a number with four digits: 5678 There's 2 even number (s). Solution + Screenshot of the run:arrow_forwardSome students have organized an election to determine the new leaders of their school club. Each member of the club has a unique ID that they can use when they vote. However, the election managers suspect that some members have voted twice. Write a program to read in member IDs and check if there are any repeated values. If an ID has already been used, output a line in this format: REPEAT: The ID BE45N6 has already been counted! Stop reading input after reading the value "STOP". Then output a line showing how many unique members voted in this format: After excluding repeats, 45 unique members voted. p5.cpp O O New I Full Screen #include using namespace std; 4 5 int main() { 7 // TODO: Write your code here cout "REPEAT: The ID " <« "AAOOAO" << " has already been counted!" <« endl; 10 cout « "After excluding repeats, e « " unique members voted." endl; 11 12 13arrow_forwardTrue/False 4. The number of times n can be divided by 2 is exp( n).arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education