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
Question
1) Write a function definition for a function named getSmaller:
a) Accept two whole numbers as input parameters.
b) Return the smaller number.
Example
Given the arguments 10 and 3 return 3.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
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
- 8. Write a function with one parameter. The function should accept the value of a radius as its argument and return the volume of the sphere with that radius. Note that the radius may be a decimal fraction. The function should not read or print anything.arrow_forwardWrite a complete C++ program that helps the teacher to calculate the result of students in the test of Programming Technique. The program should perform the following tasks: Task 1: Write a function named getInput. a) This is a non-returning function. b) It takes the score of question 1, score of question 2, and score of question 3 as input parameters. c) The function should ask the user to enter the score (per 100) for each question. It sends all the values entered by the user in (c) back to the calling module through the use of reference parameters. d)arrow_forwardCalling a function and defining a function mean the same thing True or Falsearrow_forward
- Which of the following is a correct and complete function definition? a. double funct(double x) { return 2*x; } b. double funct(Int x) { return (x-3); } c. int funct (x) { return (++x); } d. int funct (int x); e. void funct(x=7) { return 8; } f. void funct(int x=7) { return x/3; }arrow_forwardComplete the following TODO by defining a function called add_func(). Define a function called add_func() that takes two arguments. The function should adds the two arguments together using + and return the output. For example, if the input values for the arguments are 1 and 2, then 3 should be returned. Likewise, if the input arguments are "good" and " day", then "good day" should be returned. # TODO print(f"add_func output for 1 + 2: {add_func(1, 2)}") print(f"add_func output for good + day: {add_func('good',' day')}") todo_check([ (add_func(1,2) == 3,'add_func() did not return 3 when using input values 1 and 2.'), (add_func('good',' day') == "good day",'add_func() did not return "good day" when using input values "good" and " day"') ])arrow_forwardWrite a function that asks the user for their birthday month and day and then the function should call a nested function to find out the person’s zodiac sign. Test your program with some user input. Aries: March 21 - April 19 Taurus: April 20 – May 20 Gemini: May 21- June 21 Cancer: June 22- July 22 Leo: July 23 – August 22 Virgo: August 23 – September 22 Libra: September 23 – October 23 Scorpio: October 24 – November 21 Sagittarius: November 22 – December 21 Capricorn: December 22 – January 19 Aquarius: January 20 – February 18 Pisces: February 19 – March 20arrow_forward
- Problem 2: Write a function called digitMatch. The function has three integer parameters first , second and third that are positive and have the same number of digits. It returns the number of positions where their digits match. For example, if the function was applied to 17345, 97813 and 17313 it would return 1 because only the 2nd digits match. If parameters have illegal values your function can operate however you choose. For example, a program that uses the function follows. int main() { cout <« digitMatch(168, 567, 767) « endl; // prints 1 cout <« digitMatch(143, 243, 343) « endl; // prints 2 return 0; }arrow_forwardPython Help Write a function rectangle_area(length, width)Write a function rectangle_perimeter(length, width)Write a function circle_area(radius)Write a function circle_circumference(radius)Write a main function that asks the user to choose whether to find the area of a rectangle, the perimeter of a rectangle, the area of a circle or the circumference of a circle. If the user chooses to find the area of a circle use circle_area function, if the user chooses to find the area of a rectangle use rectangle_area function and so on.arrow_forward
arrow_back_ios
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