Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Preserving the Gene Pool


by CodeChum Admin



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 genes from each other and find out which one is the best!





Instructions:



In the code editor, you are provided with a main() function that asks the user for 4 integer inputs and passes these to the getBest() function call.


Your task is to declare and define this getBest() function which has the following details:


Return type - int


Name - getBest


Parameters - 4 integers


Description - returns the highest integer passed


DO NOT EDIT ANYTHING IN THE MAIN


Input



1. First integer



2. Second integer



3. Third integer



4. Fourth integer



Output



Enter·a:·10


Enter·b:·3


Enter·c:·15


Enter·d:·14


Highest·integer·=·15


Pairing Up


by CodeChum Admin



You’re tasked with pairing up people with each other but you need to figure out how well both of them work together. In order to find out how effective each pair is, you need to create a program that adds both of their values and returns their sum.





Instructions:



In the code editor, you are provided with a main() function that asks the user for two integer inputs, passes these to a function called, getSum(), and then prints the returned value.


Your task is to declare and define the getSum() function which has the following details:


Return type - int


Name - getSum


Parameters - 2 integers


Description - adds the passed integers and returns their sum


DO NOT EDIT ANYTHING IN THE MAIN


Input



1. First integer



2. Second integer



Output



Enter·first·number:·24


Enter·second·number:·21


Sum·=·45

Survival of the Biggest (JAVA)

by CodeChum Admin

Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.

Think you can handle the job?


Instructions:

  1. Input a non-zero positive integer.
  2. Using the same concept as the previous problem, figure out how to separate the digits of a number and determine which of the digits is the largest one, using a while. Afterwards, print the largest digit.
  3. Tip #1: Create another variable that will hold the largest digit. Initial its value to a negative integer, like -1, outside the loop.
  4. Tip #2: Everytime you get the rightmost digit, check if it is greater than the current largest digit. If it is, set it as the new largest digit.

Input

A line containing an integer.

214

Output

A line containing an integer.

4

binary to decimal with checking


  1. Decimal to Binary 365₁₀
  2. Decimal to Binary 1022₁₀
  3. Decimal to Binary 73₁₀
  4. Decimal to Binary 1577₁₀
  5. Decimal to Binary 64₁₀
  6. Decimal to Binary 2661₁₀

7. Decimal to Binary 3110₁₀

8 Decimal to Binary 51₁₀

9 Decimal to Binary 507₁₀

10 Decimal to Binary 4001₁₀


Problem:

Compute and display the output of the Area (A) of a rectangle, based on

inputted value for length (L) and the width (W).

Formula: A = L * W


Create a short program that will print 123467.89 as currency using NumberFormat.



Sample Output:


------------------------------------------------------------------


I have ₱1,234,567.89 in my bank account.

Create a short program that will generate a random number from 0 to 100 while using Math.random and Math.round command.


Submit your answers by attaching a screenshot of your program's source code and 3 screenshot of it's output.



Write a program that declares and initializes an array of 7 integers. The program uses these static methods to perform different operations on the array:

void printArray(int[] arr) – takes the array as parameter and prints the array in horizontal order

int sumOfArray(int[] arr) – takes the array as parameter and returns the sum of the array

int getHighest(int[] arr) – takes the array as parameter and returns the highest value in the array

int resetArray(int[] arr) – takes the array as parameter and resets the value of each element to 0


Sample output:

Here’s the array: 

3 1 3 2 1 9 1

Sum: 20

Highest: 9

Here’s the array: 

0 0 0 0 0 0 0




• Do the calculations on Matlab, print it out and then write your answers on the attached answer


sheet.


• Attach your Matlab printout to your answer sheet before you hand in.


1. Find all solutions for each of the following systems of equations (if the system is consistent):


(a) 6.5x − 2y = 7 (b) 3.5x1 + 4.5x2 + 5.5x3 = 11


2x − 0.75y = 1.75 x1 + 4x2 − 7x3 = −16


12x − y = 21 0.5x1 − 0.75x2 + 0.75x3 = 3.5



(c) − 0.75x1 + 0.75x2 = −6


2.5x1 + 2x2 − 4.5x3 = 2


1.25x1 + 1.25x2 − 2.5x3 = 0


(d) 3.4x1 + 3.4x2 − 15.3x3 = −20.4


0.5x1 + 0.25x2 − 0.75x3 = 1


0.75x1 + 0.5x2 − 1.5x3 = 1



Please note: You should use Matlab to write your systems in reduced row echelon form, but have to



interpret the results and give the solution(s) if the system is consistent.



ned help regarding assignment of SE



LATEST TUTORIALS
APPROVED BY CLIENTS