Q1) Write a program to input the values of an array 4*8 , and then find the summation of the negative values that can be divided by 14 in the array.
Q: Q5: write a program to enter the two dimensional arrays a[4][4] and b[4][4] then find there…
A: In the C programming language, when you declare an array, you are unknowingly declaring a pointer.…
Q: Q1) write a program to find the summation of 10 elemnets array. if the sum even, creas the array…
A: Find Your Answer Below
Q: 4. Write function to copy the elements of one array into another array.
A: public class Main { public static void main(String[] args) { //testing //create array…
Q: 6- Write a program to read and print a 3 by 3 array. Replace the main diagonal elements with zero.
A: Here since programming language is not defined, solving it in c++ Algorithm Start var matrix[3][3]…
Q: 3. Write statements to accomplish each of the following: a. Write a loop that adds all the elements…
A: source code lab6.c #include <stdio.h> int main(void) { // part a int length=10;…
Q: 8. Using character function(s) print the array in Example 6 as lower case letters. That is, use the…
A: Approach We will declare a counter variable “ch” in loops (for loop, while loop and do-while loop)…
Q: int A[] = {12, 34, 67, 19, 23, 66, 100, -10, 222}; Write the complete code in C language to input…
A: Solution: Given,
Q: 5. Write a program to pass an integer array of 10 elements to a function which returns the same…
A: 1) read the elements into the array 2) print the elements before sorting 3)call the function which…
Q: Q1) Write a program to read the values of an array (4*10) , and then find the product of negative…
A: Required: C++ program to find the product of negative numbers divisible by 19 in 4x10 matrix.…
Q: Q1/ Write a program to insert 10 numbers in array and then count how many even and odd numbers in…
A: Note: We are authorized to answer one question at a time, since you have not mentioned which…
Q: c++ Given the following array and output: int a[] = { 10, 5, -98, 3, 36}; Example Output -98 36…
A: Below is the c++ code for the same: Note: You can modify the program by changing the array elements…
Q: Q: write a program to define an array of ten integer elements called A, then find the sum and…
A: /*Program to find sum and average of positive numbers in array of 10 integer*/ //include standard…
Q: Q1) Write a program to input the values of an array (11*12), and then find the product of odd values…
A: Given array(11*12) means its a two dimensional array which has 11 rows and 12 columns. Steps in…
Q: 4. Write the JS Code for the following Programs? • Find the Factorial of the input Number when the…
A: Factorial of a number:- // program to find the factorial of a number // take input from the…
Q: 3) the command 'max' is used to: a. Can return the maximum number and its index in an array! b. find…
A: you answer is given below:
Q: (1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in an…
A: Accept weight from the user. Assign first weight with max weight print the weights on the console.…
Q: Q4 / Write a program to calculate the largest and smallest number in an array consisting of 12…
A: Read the inputs by taking random numbers between -5 and 20. Then use for loops to find largest and…
Q: JavaScript - Prompt Loop and Storing Input The next element of the program is to continue to prompt…
A: function startup(){ const data = []; var flag = 1; do{ var input = prompt("Enter…
Q: Q2: Write a program to input data into one dimensional array of 5 elements. Calculate the sum and…
A: In C++, an array is a collection of elements are stored at contiguous memory locations and using the…
Q: B) Write a C++ program to enter the details of an array of 10 Books (Use Struct Book). The struct…
A: We are asked to write a C++ program to enter the details of an array of ID Books (Use Struct Book).…
Q: Write a program that takes characters of your name and saves it in array and then displays your name…
A: A required C++ program is as follows, #include<iostream> using namespace std; int main() {…
Q: 4. Write the JS Code for the following Programs b) Find the Factorial of the input Number when the…
A: javascript is a scripting language for web pages. The javascript is used to write the code for the…
Q: 1. Write a program that adds up two 4x4 arrays and stores the sum in third array.
A: As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: Q5: Write a program to reverse the elements of an integer array. Note, your program should not just…
A: Array is a linear data structure used to store homogenous types of data. Reversing an array means…
Q: 1. Write a program which reads 10 integer numbers into an array and display each of the value inside…
A: PROGRAM INTRODUCTION: Include the required header files. Declare the required variables. Take ten…
Q: III. WRITE A COMPLETE PROGRAM TO INPUT UP TO A MAXIMUM OF 25 CHARACTERS INTO AN ARRAY. THE PROGRAM…
A: Python code for reversing a character and count the number of vowels in the list def reverse(s):…
Q: Problem 3 Write a program to get 8 numbers from the user. Then the program will determine the…
A: Solution :: Java Program: Let's see first how to print the user input in Java . We use following…
Q: Exercise 4.1: Write a program to define an integer array, store 10 integers in array. Input a number…
A: You are not mentioned programming language so I am going to write code in c++ language #include…
Q: Q5/ Write program to input 20 numbers in one array and then separate the 10 greater numbers in one…
A: An array is a linear data structure that stores the collection of the elements in computer memory in…
Q: Q5: Write a program to input float type data into a 2D array having 5 rows and 4 columns. Find out…
A: Declare an array Input the values Initialize a variable max with first element of array Compare the…
Q: Q4) Assume you have two arrays A and B where array A has 10 integer numbers and array B has five…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //get…
Q: Input the scores of n students saved in the array, output the average value, and sort the scores of…
A: Logic: Accept number of students Accept array elements Calculate the sum Calculate…
Q: Q1) Write a program to read 10 temperatures in an array from the keyboard then compute and print the…
A: As per company guidelines, one question will be answered. So, please repost the another one as a…
Q: Write a program to input n number of elements in an array, increment each by 1 and display the…
A: As no programming language is mentioned, using c++.
Q: 6. Referring to the array definitions in Question 3, write a program to sum array DONKEY.
A:
Q: 1 function Write a program that will determine the discount of an item depending on its price and…
A: Write a program that will determine the discount of an item depending on its price and quantity.…
Q: Q1. Write a code to find the summation of all numbers that are less than or equal to 10 in the…
A: As per the given question, the last element in the array is confusing, is it -3 or -.3? so I have…
Q: 2. Write a program to store and print the names of your two favorite television programs. Store…
A: You have not mentioned the language in which you want the answer. But looking at the function and…
Q: Q2: Write a complete program to calculate the sumation of the primary diagonal elements in a square…
A: It is provided that there is an square array having 36 elements. So to find the number of rows and…
Q: age of 10 one dimensional array and then order the array in Write a C code that read the students in…
A: C progaram
Q: ii) What will be the maximum element of the array given below if the first k elements are removed…
A: Write a C program to input the value of k and find the maximum element of the array given below if…
Q: 4. Declare a two-dimensional array that has 3 columns and 4 rows. 5. Write a for loop that will…
A: Ans 4: Declare the two dimensional array that has 3 columns and 4 rows is:\ int arr[4][3]…
Q: c++ 3. Write a program which will prompt the user to enter a string from the keyboard. The…
A: Explanation: - The program makes use of string header file explicitly to use the size() method to…
Q: Write code to do the following: 1. Initialize a partially filled array named months that can store…
A: #include<iostream>using namespace std;//Output function declarationvoid Output(char…
Q: To swap the 3rd and 4th elements in the int array values, you would do:
A: Considering this in c code although logic remains the same for all languages
Q: har zetta[10] = {'B','A','D','G','U','Y','H','E',’L’,’P’}; Write a C programing code that will…
A: Array indexing starts from 0 and thus index values will be from 0-9 for this array Here, we have to…
Q: b) Assume an integer array of size 12 named arrSales stores the sales of a product for each month.…
A: I give the code along with output and code screenshot in C++
Q: a) Write a declaration to store the string “This is a test” in an array named strtest. Include the…
A: #include <iostream>using namespace std; int main(){ const int NUMDISPLAY = 14; char strtest[]…
Q: 4. Write the JS Code for the following Programs b. Test whether the Input Number is ODD or EVEN c.…
A: Given: To write Js code for the following programs: Note:As per rules I have answered one…
Q: Complete the following program should first fill in (by asking the user for input) and then list all…
A: Given: Complete the following program should first fill in (by asking the user for input) and then…
Step by step
Solved in 3 steps with 1 images
- (Program) Write a declaration to store the following values in an array named rates: 12.9, 18.6, 11.4, 13.7, 9.5, 15.2, and 17.6. Include the declaration in a program that displays the values in the array by using pointer notation.(Numerical) Given a one-dimensional array of integer numbers, write and test a function that displays the array elements in reverse order.(Electrical eng.) Write a program that declares three one-dimensional arrays named volts, current, and resistance. Each array should be declared in main() and be capable of holding 10 double-precision numbers. The numbers to store in current are 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, and 3.98. The numbers to store in resistance are 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9, and 4.8. Your program should pass these three arrays to a function named calc_volts(), which should calculate elements in the volts array as the product of the corresponding elements in the current and resistance arrays (for example ,volts[1]=current[1]resistance[1]). After calc_volts() has passed values to the volts array, the values in the array should be displayed from inside main().
- (Data processing) Construct a three-dimensional weather array for a two-week time period. Include this array in a C++ program that displays the temperatures correctly in response to any of the following user requests: • Any day’s high and low temperatures • Average high and low temperatures for a given month • Month and day with the highest temperature • Month and day with the lowest temperatureMark the following statements as true or false. A double type is an example of a simple data type. (1) A one-dimensional array is an example of a structured data type. (1) The size of an array is determined at compile time. (1,6) Given the declaration: int list[10]; the statement: list[5] - list[3] * list[2]; updates the content of the fifth component of the array list. (2) If an array index goes out of bounds, the program always terminates in an error. (3) The only aggregate operations allowable on int arrays are the increment and decrement operations. (5) Arrays can be passed as parameters to a function either by value or by reference. (6) A function can return a value of type array. (6) In C++, some aggregate operations are allowed for strings. (11,12,13) The declaration: char name [16] = "John K. Miller"; declares name to be an array of 15 characters because the string "John K. Miller" has only 14 characters. (11) The declaration: char str = "Sunny Day"; declares str to be a string of an unspecified length. (11) As parameters, two-dimensional arrays are passed either by value or by reference. (15,16)(Electrical eng.) a. An engineer has constructed a two-dimensional array of real numbers with three rows and five columns. This array currently contains test voltages of an amplifier. Write a C++ program that interactively inputs 15 array values, and then determines the total number of voltages in these ranges: less than 60, greater than or equal to 60 and less than 70, greater than or equal to 70 and less than 80, greater than or equal to 80 and less than 90, and greater than or equal to 90. b. Entering 15 voltages each time the program written for Exercise 7a runs is cumbersome. What method could be used for initializing the array during the testing phase? c. How might the program you wrote for Exercise 7a be modified to include the case of no voltage being present? That is, what voltage could be used to indicate an invalid voltage, and how would your program have to be modified to exclude counting such a voltage?
- (Electrical eng.) Write a program that specifies three one-dimensional arrays named current, resistance, and volts. Each array should be capable of holding 10 elements. Using a for loop, input values for the current and resistance arrays. The entries in the volts array should be the product of the corresponding values in the current and resistance arrays (sovolts[i]=current[i]resistance[i]). After all the data has been entered, display the following output, with the appropriate value under each column heading: CurrentResistance Volts(Data processing) Write an array declaration statement that stores the following values in an array named volts: 16.24, 18.98, 23.75, 16.29, 19.54, 14.22, 11.13, and 15.39. Include these statements in a program that displays the values in the array.(Data processing) Write a program that uses an array declaration statement to initialize the following numbers in an array named slopes: 17.24, 25.63, 5.94, 33.92, 3.71, 32.84, 35.93, 18.24, and 6.92. Your program should locate and display the maximum and minimum values in the array.
- (Data processing) The answers to a true-false test are as follows: T T F F T. Given a twodimensional answer array, in which each row corresponds to the answers provided on one test, write a function that accepts the two-dimensional array and number of tests as parameters and returns a one-dimensional array containing the grades for each test. (Each question is worth 5 points, so the maximum possible grade is 25.) Test your function with the following data:(Numerical) a. Define an array with a maximum of 20 integer values, and fill the array with numbers input from the keyboard or assigned by the program. Then write a function named split() that reads the array and places all zeros or positive numbers in an array named positive and all negative numbers in an array named negative. Finally, have your program call a function that displays the values in both the positive and negative arrays. b. Extend the program written for Exercise 6a to sort the positive and negative arrays into ascending order before they’re displayed.(List maintenance) The following letters are stored in an alphabet array: B, J, K, M, S, and Z. Write and test a function named adlet(), which accepts the alphabet array and a new letter as arguments, and then inserts the new letter in the correct alphabetical order in the array.