Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Find the numbers that can be expressed as the product of two nonnegative integers in
succession and print them in increasing order. (For example, 30 is such a number as it can be
written as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user should
specify a maximum value and the program should print all said numbers smaller than or equal to
that value. The program should keep a count of how many numbers were printed and should
output that count, as well as the numbers.
creat a git bash script for the problem above
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- a and b are int variables containing values, and a > b.Write a for loop that prints even integer numbers from a to b (both inclusive).(Example: if a=41, b=16, then it will print 40 38 36 .... 18 16)Write only the for loop with its block, nothing else. This is a java question.arrow_forwardPlease explain the coding. Screen shot the code and the output.arrow_forwardThis program should compound interest continuously. It asks the user for the number of times they want to see their $1 compounded. And the years used in the equation are 1,2,4,8,16.2^N. I. E. I want to see it compounded three times so the user enters 3. The problem is that when I run it. It computes it as though it's going through numbers like 1,2,3,4,5,6,7,8,9. But I need it to go through the numbers I have it. As in 1,2,4,8,16..2^N And the out put should read [2.0,2.25,2.44140625 HWOS.py-CAsers/kr Help 205 py (3.7A) File Edit Format Run Options Window .Evan Mar th 14 September 2019 Hamework 2 QS print (*Nodel Compound Interest Produ ct= (1 N - int (input{'Enter N: n -[1,2,4,8,116,20] tor a in range (2, N+1) : for 2, 2, 4. D , 16 .. 2-N Periods.) for 3 in range ( len (n>.. - 2 (1+1/1) Droduct.appernd (amount) amount Print (product) ...arrow_forward
- Q1: Write a program that reads a set of N integers. Then, the program finds and outputs the sum of the even values and the sum of the odd values of them. For example: if the value entered for N=5, and the five integers are 3, 6, 2, 9, 7. Then the sum of even values (6+2 = 8), and the sum of odd values (3+9+7 = 19) Q2: Write a program that reads some numbers until it reaches a specific value (assume -1 is a stop value in this case). The program should find and outputs the average of all of the numbers (between 10...40) except the stop value (-1). For example: If the numbers look like: 12 5 30 48 -1. Then, the average of the numbers: (12+30)/2 = 21.arrow_forward3. Find the largest among 3 unequal positive numbers. 4. Check whether a number is divisible by 5. If yes, find the area of a triangle. If not, find the area of a rectangle. [Area of triangle= ½ * b*h; Area of rectangle = 1*b] 5. To read 10 numbers and print the sum of their digits.arrow_forwardMagic program ask user to enter three integers by the user, the three integers represent left bound,right bound and arbitrary digit ‘m’, where left bound is less than right bound. Program should print allmagic numbers in the given range that doesn’t contain digit 'm'. The number is magic if its every digit islarger than the sum of digits which are on the right side of that digit. For example, 94210 is magicnumber because 1 > 0, 2 > 1+0, 4>2+1+0, and 9 > 4+2+1+0.Write a complete C program that Call only One Function (magic_numbers) that will print all magicnumbers excluding a given digit ‘m’ that also entered by user ?arrow_forward
- Code language Java 1, Add a print statement to say “Multiplication Table” and then prompt theuser to enter an integer. Your program should then prints “times table” for thenumbers from 1 to the given integer (inclusive). That is, for input n, you would printa table of n rows (lines) each with n columns, where the cell at row i and columnj contains the value i × j. You do need separate rows, but don’t worry about thecolumns lining up nicely yet. 2. Add a print statement to say “Prime Testing”.Using the integer entered by the user above, print out all the prime numbers between2 and the number squared. E.g., if the user types 12 for the multiplication table part,you should print all the prime numbers that are not larger than 144.All integers are either prime or composite. A prime number is one that has no integerfactors other than itself or one. Examples are 2, 3, 5, 7, 11, 13, . . .. A compositenumber, by contrast, has multiple factors. Examples are 4, 6, 12, 15, 18, 21, . . ..Testing…arrow_forwarda and b are int variables containing values, and a < b.Write a for loop that prints all odd numbers from a to b (both inclusive).(Example: if a=25, b=82, then it will print 25 27 29 .... 79 81)Write only the for loop with its block, nothing else. with javaarrow_forwardJavaarrow_forward
- Write only in javaarrow_forwardFinish the function below that takes in the length of the two parallel sides of a trapezoid a and b, which are separated by a distance h, and returns its area. In [ ]: defarea_of_trapezoid(a,b,h):# YOUR CODE HEREraiseNotImplementedError() In [ ]: """Check that area_of_triangle returns the correct output for several inputs""" assert abs(area_of_trapezoid(3,3, 5) - 15) <=.1 assert abs(area_of_trapezoid(3,4, 5) - 17.5)arrow_forwardPlease code in Java or C or C++ or C # or python 2 or 3 or R( Any one of the following)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education