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
Define an user defined C++ function to find out the average of four integer numbers. The function should take the values those are passed as parameters and returns the average to the main function.
Sample input:
Enter four integers: 10 20 30 42
Average: 25.50
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 3 steps with 2 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
- In c programming Your faculty was born in the year 1997 and he loves the digits of this number. So he is asking you to write a code where you will be given a string of digits as input and you need to find whether all the digits 1,9, and 7 is present in that string or not. Use function to solve this problem. [Hint: Write a function that will find a particular character in a string and call that function thrice to find each of 1,9, and 7 in the given string.] Sample Input 1: 36892502945417835 Sample Output 1: Yes Explanation 1: All 1, 9, and 7 are present in the number Sample Input: 3689250294547835 Sample Output: No Explanation: The digit 1 is missing from the input stringarrow_forwardWrite a function with one integer parameter that will return the sum of the divisors of its argument c++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_forward
- Create a function in C language that takes two integers x, and y as the parameters and returns the sum and the absolute difference of both the numbers but the return type of the function should be void. You can add extra parameters to the function but the function should not return anything and should send the required values as well. Test your function for the numbers 10, and 5 inside the main function.arrow_forwardWrite a function prototype for a function named my_function that accepts two integers (a,b) as parameters and returns a integer? (C++)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