(7) Write a program that produces the following giraffe:
/)ii/)
(o “ )
| |
|o |
| |__________||
| o |
| o _______o__|
|||| || ||
|||| || ||
print("/)ii/)")
print("(o “ )")
print(" | |")
print(" |o |")
print(" | |__________||")
print(" | o |")
print(" | o _______o__|")
print(" |||| || ||")
print(" |||| || ||")

(7) Write a program that produces the following giraffe: /)ii/) (o “ ) | |...
Write a program that produces the following output for a random number of digits on a row and a random number of rows. 1****** 12***** 123**** 1234*** 12345** 123456* 1234567 Write a program that calculates the following series: i=1n(12)n=12+14+18+...+12n (hint: we need to talk about integer division) Use for loops to write a code segment that prints the following output. 1 2 3 4 2 4 6 8 3 6 9 12 4 8 12 16 5 10 15 20
in JAVA write a program that produces the following output using nested for loops: +------+ | ^^ | | ^ ^ | |^ ^| | ^^ | | ^ ^ | |^ ^| +------+ | vv | | v v | |v v| | vv | | v v | |v v| +------+
Write a program Using loops to display the following patterns – (i) ********** (ii) ******************** (iii) * ** *** **** ***** ****** ******* ******** ********* ********** (iv) * ** *** **** ***** ****** ******* ******** ********* ********** *********** ************ ************* ************** *************** **************** ***************** ****************** ******************* ******************** (v) ********** ********* ******** ******* ****** ***** **** *** ** * (vi) ******************** ******************* ****************** ***************** **************** *************** ************** ************* ************ *********** ********** ********* ******** ******* ****** ***** **** *** ** * Your...
write a java program that displays the following:
Write a Java program that prompts the user to enter an integer and determines whether 1. it is divisible by 5 and 6, whether on 2. it is divisible by 5 or 6, 3. it is divisible by 5 or 6, but not both. Here is a sample run of this program: Sample run: Enter an integer: 10 Is 10 divisible by 5 and 6? false Is 10 divisible by 5 or...
Write a simple Java program that that sorts the following array, 5 7 4 9 8 5 6 3, using a selection sort algorithm. What is the Big O of the algorithm?
Write 8085 microprocessor instructions for the following
(ii) write the 8085 instructions to: 1. Load 90H in the accumulator. 2. Add 32H to the contents of accumulator. 3. Initialize stack pointer to FF00H. 4. Rotate accumulator left through carry 5. Store the contents of the accumulator into memory location E500H. 6. Transfer the program control to memory location D500H if carry flag is set. 7. Complement the content of the accumulator 8. Stop program execution
Use duality to answer the following application. Oz makes lion food out of giraffe and gazelle meat. Giraffe meat has 18 grams of protein and 36 grams of fat per pound, while gazelle meat has 36 grams of protein and 18 grams of fat per pound. A batch of lion food must contain at least 50,400 grams of protein and 75,600 grams of fat. Giraffe meat costs $2 per pound and gazelle meat costs $4 per pound. How many pounds...
Write a program that displays the following pattern: Write a program that displays the following table: Assume a runner runs 14 kilometers in 45 minutes and 30 seconds. Write a program that displays the average speed in miles per hour. (Note that 1 mile is 1.6 kilometers) The U.S. Census Bureau projects population based on the following assumptions: One birth every 7 seconds One death every 13 seconds One new immigrant every 45 seconds Write a program to display the...
Lab 7: Methods 1. Write a Java program called Numbers that calls the following methods and displays the returned value: o Write a method called cubeIt that accepts one integer parameter and returns the value raised to the third power as an integer. 2. Write a method called randomInRange that accepts two integer parameters representing a range. The method returns a random integer in the specified range inclusive. o Write a method called larger that accepts two double parameters and...
II. Using Newton’s method, write a MATLAB program to find the fixed point of the following function: ?(?) = √? + ?? accurate to at least 8 decimal places. (HINT: finding the fixed point of f(x) is the same as finding the zero of g(x) = f(x) − x. ) The output of this program should display in a single table (i) the solution for the fixed point, (ii) the initial guess, (iii) the number of iterations it took to...