6. Preserving the Gene Pool 1 #include

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Hello! Please help me find the C language code of this. Thank You!

2. Name - getBest
main.c
3. Parameters - 4 integers
4. Description - returns the highest integer passed
1 #include<stdio.h>
3. DO NOT EDIT ANYTHING IN THE MAIN
2
3- int main(void) {
int a, b, c, d;
4
Input
printf("Enter a: ");
scanf("%d", &a);
6.
7
1. First integer
8
printf("Enter b: ");
scanf("%d", &b);
2. Second integer
9.
10
3. Third integer
11
printf("Enter c: ");
scanf("%d", &c);
12
4. Fourth integer
13
14
printf("Enter d: ");
scanf("%d", &d);
15
Output
16
17
18
int highest = getBest(a, b, c, d);
Enter a: 10
19
Enter b: 3
20
printf("Highest integer = %d", highest);
Enter c: 15
21
Enter d: 14
22
return 0;
23
Highest integer = 15
Transcribed Image Text:2. Name - getBest main.c 3. Parameters - 4 integers 4. Description - returns the highest integer passed 1 #include<stdio.h> 3. DO NOT EDIT ANYTHING IN THE MAIN 2 3- int main(void) { int a, b, c, d; 4 Input printf("Enter a: "); scanf("%d", &a); 6. 7 1. First integer 8 printf("Enter b: "); scanf("%d", &b); 2. Second integer 9. 10 3. Third integer 11 printf("Enter c: "); scanf("%d", &c); 12 4. Fourth integer 13 14 printf("Enter d: "); scanf("%d", &d); 15 Output 16 17 18 int highest = getBest(a, b, c, d); Enter a: 10 19 Enter b: 3 20 printf("Highest integer = %d", highest); Enter c: 15 21 Enter d: 14 22 return 0; 23 Highest integer = 15
main.c
+
6. Preserving the Gene Pool
1
#include<stdio.h>
by CodeChum Admin
2
In order to make sure that the future generations will grow into great beings, we must make
sure that the gene pool consists of the best genes. In order to do that, we must compare
3. int main(void) {
int a, b, c, d;
4
printf("Enter a: ");
scanf("%d", &a);
genes from each other and find out which one is the best!
7
8
Instructions:
printf("Enter b: ");
scanf("%d", &b);
10
1. In the code editor, you are provided with a main() function that asks the user for 4
11
integer inputs and passes these to the getBest() function call.
2. Your task is to declare and define this getBest() function which has the following
printf("Enter c: ");
scanf("%d", &c);
12
13
details:
14
1. Return type - int
printf("Enter d: ");
scanf("%d", &d);
15
16
2. Name - getBest
3. Parameters - 4 integers
17
18
int highest = getBest(a, b, c, d);
4. Description - returns the highest integer passed
19
3. DO NOT EDIT ANYTHING IN THE MAIN
20
printf("Highest integer = %d", highest);
21
22
return 0;
Input
23 E
1. First integer
2. Second integer
Transcribed Image Text:main.c + 6. Preserving the Gene Pool 1 #include<stdio.h> by CodeChum Admin 2 In order to make sure that the future generations will grow into great beings, we must make sure that the gene pool consists of the best genes. In order to do that, we must compare 3. int main(void) { int a, b, c, d; 4 printf("Enter a: "); scanf("%d", &a); genes from each other and find out which one is the best! 7 8 Instructions: printf("Enter b: "); scanf("%d", &b); 10 1. In the code editor, you are provided with a main() function that asks the user for 4 11 integer inputs and passes these to the getBest() function call. 2. Your task is to declare and define this getBest() function which has the following printf("Enter c: "); scanf("%d", &c); 12 13 details: 14 1. Return type - int printf("Enter d: "); scanf("%d", &d); 15 16 2. Name - getBest 3. Parameters - 4 integers 17 18 int highest = getBest(a, b, c, d); 4. Description - returns the highest integer passed 19 3. DO NOT EDIT ANYTHING IN THE MAIN 20 printf("Highest integer = %d", highest); 21 22 return 0; Input 23 E 1. First integer 2. Second integer
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY