(Practice) a. Write a
b. Repeat Exercise 6a, but after the data has been entered, have your program display it in the following form:
Trending nowThis is a popular solution!
Chapter 7 Solutions
C++ for Engineers and Scientists
- (C PROGRAMMING ONLY) 1. Spell-it-out!by CodeChum Admin Are you intimidated with complicated words? Don't be! The trick is to break it down letter by letter! Let’s create a program that prints out the character in the array index indicated by the input integer. For example, if the array has 3 character elements, 'j', 'r', and 'd', and the inputted integer value is 1, then we print 'r' because 'r' is found at index 1. Instructions: In the code editor, you are provided with an array of characters (or a string).Your task is to ask the user for an integer input which represents the index and then print out the character of the string found at that index.Input 1. Index of the array Output Enter the index: 4rarrow_forward(In Python)Complete the function separate_numbers, which takes in an array of numbers and a boolean value. It should return the number of even values in the array if the argument return_even is True, or the number of odd values in the array if return_even is False. Hint: Use the count_evens functionarrow_forward(Python) Write a NumPy program to create a 5x5x3 array with random values and find the minimum and maximum values.arrow_forward
- (V) USING NUMPY IN PYTHON, WRITE A PROGRAM TO CHECK WHETHER THE ARRAY GIVEN BELOW CONTAINS A NON-ZERO ELEMENT OR NOT. [0, 12, 0, 0, -1, O,0]arrow_forward[C Program] 3. Float Count-off by CodeChum Admin Counting off a list of float numbers is hard when you speak it, but not when you code it! Don't believe me? Then let's try coding just that! Instructions: An array containing 30 predefined float values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first. Each outputted value must also only show up to two decimal places. Output Multiple lines containing a float number. 2.41 143.00 3.14 3.12 0.00 -321.12 -414.12 12312.10 4.10 2.42 . . . ---------------------------------- #include<stdio.h> int main(void) { float nums[30] = { 1.4, 1.2054, 2.2, 2.5, 3.66, 3.0, 4.024, 4.00001, 5.5, 5.10, 1, 2, 3, 4, 5, -1.11, -1.111, -1.1111, -1.11111, -1.111111, 2.421, 4.1, 12312.1, -414.123, -321.12, 0, 3.123, 3.14, 143, 2.412 }; return 0; }arrow_forward[C Program] 3. Float Count-off by CodeChum Admin Counting off a list of float numbers is hard when you speak it, but not when you code it! Don't believe me? Then let's try coding just that! Instructions: An array containing 30 predefined float values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first. Each outputted value must also only show up to two decimal places. Output Multiple lines containing a float number. 2.41 143.00 3.14 3.12 0.00 -321.12 -414.12 12312.10 4.10 2.42 . . . ------------------------------------ #include<stdio.h> int main(void) { float nums[30] = { 1.4, 1.2054, 2.2, 2.5, 3.66, 3.0, 4.024, 4.00001, 5.5, 5.10, 1, 2, 3, 4, 5, -1.11, -1.111, -1.1111, -1.11111, -1.111111, 2.421, 4.1, 12312.1, -414.123, -321.12, 0, 3.123, 3.14, 143, 2.412 }; return 0; } [C Program] [C…arrow_forward
- (C PROGRAMMING ONLY) 2. Odd Lifeby CodeChum Admin In life, anything can happen. Yesterday we're happy, tomorrow we're sad. One moment we're up, the next we're down. Life's odd. But that's what makes it beautiful ? In this program, let's try displaying all the odd numbers of our array, life, but with the use of functions! Instructions: In the code editor, you are provided with an array called, life. Furthermore, in the main(), a function call was made to the function displayOdd() where the array life was passed as well as the size of life which is 90.Your task is to declare and define the function displayOdd() which has the following details:Return type - voidName - displayOddParametersint* - an arrayint - the size of the arrayDescription - displays all the odd numbers found in the array passed, starting from the end. Output Odd element at index 80: 33Odd element at index 77: 69Odd element at index 76: 17Odd element at index 73: 15Odd element at index 69: 101....arrow_forwardNote:-Don't try to copy other's work otherwise I'll reduce rating for sure and will report. Don't use AI to generate answerarrow_forward(C PROGRAMMING ONLY) Thanks for fixing me! I am now okay. My next problem though is I don't know what to do with my life. Can you please show me? Instructions: In the code editor, you are provided with an array called me that contains 100 elements. Your task is to print all the elements of the array starting from the last element up to the first element. For this problem, using a loop would be very helpful. Outputarrow_forward
- (Java)Music playlist: - Create an array that can hold at least 50-100 songs. - There is 3 function: search the titles, sort the titles and randomize - Please include a comment to explain each step. Tysm!!arrow_forward(JAVA) Create a two-dimensional array of type double to contain the three different SD Marks (JD521, PRG521, and IP521) for six different students. A single array of type String must be used to store the student names (Maxwell, Carl, Gerhard, Paul, James, and Cena). Allow a user to enter in a number, ranging from 1 to 6, which will represent the student position in the table MCSD max and present the marks for each respecting module. The program can only stop when the user enter a number greater than 6. Printout the student name including the JD521, PRG521, and IP521 max, the total of marks and the average of all marks. Use a condition statement to decide that the student has passed or not (Pass rate is 70). The programming language is java Student name JD521 PRG521 IPG521 Maxwell 80 65 70 Carl 95 70 65 Gerhard 87 80 73 Paul 65 45 60 James 45 87 65arrow_forward8. Write statements to accomplish each of the following a. Display the value of the seventh element of character array f. b. Input a value into element 4 of one-dimensional floating-point array b. c. Initialize each of the five elements of one-dimensional integer array g to 8. d. Total the elements of floating-point array c of 100 elements. e. Copy array a into the first portion of array b. Assume double a[11], b[34] f. Determine and print the smallest and largest values contained in 99- element floating-point array w.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr