Question 2. Write a complete C++ program that uses a 2-dimensional array with 4 rows and 30 columns. Row represents sections of a course and column represents the students, value inside each position of the array is the final exam grade for each students. Fill the array with random numbers between 40 and 100. Calculate the total, average, maximum, minimum for each section.
Q: Write C++ application with several functions that deal with a two-dimensional array of positive…
A: The problem shows a need of printing a 20*20 matrix having random numbers from 1 to 1000. It then…
Q: Write a program in c bullet: to Input data into an array of 5 elements Calculate the sum and average…
A: Note : since its mentioned to provide input and output on c++ . we are providing code in c++…
Q: Write a program in C # that lets the user to define the number of rows and columns. T
A: Programming approach: Declaring index variables "i" and "j" for rows and columns. Declaring integer…
Q: A C++ program to add two numbers using pointers.
A: Note: we are allowed to solve one question in one post. please post other question in separate post.…
Q: COMSATS is a well famous University for Computer Science. It Keeps the Student’s record in a…
A: Given: COMSATS is a well famous University for Computer Science. It Keeps the Student’s record in a…
Q: Write a C++ function to find out if two arrays have the same elements at same indices or not
A: According to the question we need to write a C++ function to find out if two arrays have the same…
Q: An array containing 30 predefined float values are already provided for you in the code editor.…
A: Floating point numbers are used to represent noninteger fractional numbers and are used in most…
Q: c++ Start with a program that allows the user to input a number of integers, and then stores…
A: First, we will input the no. of elements of the array. Then we will input all the elements of the…
Q: Start with a program that allows the user to input a number of integers, and then stores them in an…
A: Declare the header files. Define the Function maxInt and pass the array and number of elements.…
Q: Strings in C have a terminal character at the end of the array, while integer arrays, for example,…
A: Introduction: A unique "null" character is used at the end of C strings to show that they're done.…
Q: 1. Write a complete C program that declares an array of size 10 of datatype double, inputs 10 values…
A: C code and output are in step2.
Q: Q// write a program in C language to name a row with the name (Snapne) to calculate the total area…
A: The below code is written in turboC++ , Remove getch() and clrscr() and #include<conio.h> to…
Q: Write a C++ function called displayArray7. The function should accept a two-dimensional array as an…
A: Here we have to create a function called displayArray7 and it accepts a two-dimensional array as an…
Q: Write a C++ program that allows a cosmetic company to keep track of six different products:…
A: Use a loop to check the validation of input of each sale in the array and have two integers to track…
Q: Question 3: Write a C++ program to read a 1D array. Then, create a function that prints out the…
A: #include<iostream>using namespace std;void odd_even_large(int arr[],int n){ int…
Q: Which of the following statements are true for static arrays in C++? Static arrays are declared with…
A: Static array is an array which has fixed size to hold the array of values. Example: int ages[5] Here…
Q: In C++ which of the following correctly declares an array? a) int array[10]; b) int array; c)…
A: Given, Choices: int array[10]; int array; array{10}; array array[10]; We have to find…
Q: C++ Start with a program that allows the user to input a number of integers, and then stores…
A: Actually, program is a executable software that runs on a computer. C++ is a powerful general…
Q: Write a program in C that will find the second smallest number from an array and print those numbers…
A: While doing programming in any programming language, you need to use various variables to store…
Q: [C Program] 3. Float Count-off by CodeChum Admin Counting off a list of float numbers is hard when…
A: Find your Code Below
Q: Classwork_1.2: Write a program in C for a 2D array, to input and display the size of a matrix. Write…
A: Below is the required C code. Program Approach: Include necessary header files to get a standard…
Q: c) Write a C++ program to record temperature for the number of days required by the user. • Prompt…
A: /*C++ Program to record temperature for the number of days required by user and display average…
Q: a c++ program for a (cafe system) that includes this specifications: -Functions (should include…
A: Program Explanation: 1) Implementing the header file. 2) Declare the integers. 3) Use the if-else…
Q: a. Write, compile, and run a C++ program to input 10 integer numbers into an array named fmax and…
A: Here you posted multiple questions, as per the policy we can answer only one question. Here doing…
Q: Write a function that will take an integer array and its size. This function will move all the odd…
A: This can be solved in many ways but let's make it easy for you by having different arrays for even…
Q: The Somalian Elections will take place in June 202é. You were hired as a programmer to come up with…
A: The following C++ program will accomplish the job stated in the first 3 questions. The program is…
Q: Write a C++ program. The local taqueria has decided they need to raise their prices. In order to…
A: I have provided C++ CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: 3.Write a C program that will ask the user to enter 50 positive integer. If the user enters an…
A: Use a 2d array having 5 rows and 10 columns so that we can store 50 elements
Q: C++ Write a function that accepts an int array and the array’s size as arguments. The function…
A: The solution for the above given program is given below:
Q: d) Write a C++ program to declare a vector of char data type and insert all lowercase alphabets into…
A: Write a C++ program to declare a vector of char data type and insert all lowercase alphabets into…
Q: Question 1: Write a program in C++ language to sorting the 1D array size 8, (descending). Assume the…
A: 1. The array contents are already given. The required C++ code is : #include <iostream> using…
Q: Let the one-dimensional array is declared in the C++ program as (int X[5]=(7,5,8,2,9);). Write one…
A: 1) The major objective of the program is to declare the one-dimensional array. The program is to be…
Q: Given an array with the name and element of array_num[7] = {5,6,1,12,5,5,12}. You are required to…
A: #include<stdio.h> //Program to count most occuring elementint most_occurred(int array_num[],…
Q: FUNCTION C++ PROGRAM Write a global and local variable program that would require the user to input…
A: c++ code to find area,diameter,circumference of a circle is given in step2:-
Q: My question is for c programming. Write a program that asks the user to enter a float value for…
A: #include <stdio.h> int main(){ //declaring variables float techarray[5]; int i;…
Q: Start with a program that allows the user to input a number of integers, and then stores them in an…
A: Step 1:- Program Approach:- 1.Create the function whose name is maxint(int *a , int n). This…
Q: Write C++ Program to determine the max numbers between 2 arrays. For example: 6 3 1 34 2 011 20…
A: Here we are changing the value of elements in array 1 if the element is array 1 at particular index…
Q: Write a C++ function that is supposed to take as a parameter a pointer to an array named salaries…
A: #include <iostream>using namespace std;//method that takes salaries array as pointer, size of…
Q: Write a C# code that contains a two dimensional integer array which has the size 3x4; A random…
A: Use a 2d array to store random values Generate random values and store into array and display them…
Q: My question is for c programming. write a program that gets 8 different double values from the user…
A: #include<stdio.h> int main() { double arr[10]; double min,max; printf("\nEnter 8 different…
Q: 2. Write a C program that reads a text file into an array of character (read as a string) and…
A: C Code #include <stdio.h> // include library #include <stdlib.h>int main(){ //…
Q: -dimensional integer array containing the grades of a group of students who took a college entrance…
A: Define header file <iostream> for io operations. Define main function. Define int variables i,…
Q: iven the following array declaration: int A [3 ][2 ]={{13, -23}, {3, 80} ,{91,55} }; declare a…
A: The program is written in C Language. Check the program screenshot for the correct indentation.…
Q: Write a function in c that displays the contents of an array in a predefined format with the value…
A: Code #include <stdio.h>void displayArray(int arr[],int n){ int i; for(i=0;i<n;i++)…
Q: Write a function in C++ that takes a pointer to an array as one parameter, and the length of the…
A: As per our guidelines, we are supposed to answer only one question. Kindly repost other questions as…
Q: COMSATS is a well famous University for Computer Science. It Keeps the Student’s record in a…
A: Code: #include <stdio.h>#include<stdlib.h>int n=1000;/*Student structure:I. Reg No…
Q: COMSATS is a well famous University for Computer Science. It Keeps the Student’s record in a…
A: Given: COMSATS is a well famous University for Computer Science. It Keeps the Student’s record in a…
Q: Create a program in C Language that calculates a student's overall grade based on their assignments,…
A: #include <stdio.h>#include <stdlib.h> #define SIZE1 5#define SIZE2 3#define SIZE3 2 int…
Q: Grades 0-100 will be assigned randomly in a series with 30 elements. Taking their averages (shown on…
A: to generate random numbers we use rand() function 0-100 random numbers are generated using…
Question 2. Write a complete C++
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays so that a customer’s record can be accessed randomly by account number. Create the file by entering five customer records, with each record consisting of an integer account number (starting with account number 1000), a first name (maximum of 10 characters), a last name (maximum of 15 characters), and a double-precision number for the account balance. After the file is created, write a C++ program that requests a user-input account number and displays the corresponding name and account balance from the file.Write C++ application with several functions that deal with a two-dimensional array of positive integers: The number of rows and number of columns of the array should be 20. Fill the array with random numbers between 1 and 1000. Display a table that contains the array values, numbers (elements of the array) should be aligned. Display the indexes, for example (rowIndex,columnIndex), where the prime numbers are stored. Display a table of the same size of the input array that contains the array values of prime numbers that you found. Do not show the composite numbers in the array. That is, you should leave out blanks for the composite numbers or put zeros in that position.3. Write a C# application that asks the user to search for an item in the array. Input an array of 10 elements and the search item. If the item is found in the array, display the location of the item in the array. Otherwise, display appropriate error messages.
- Write a program in C as follows:- Create an array of integers named “toy” that has 120 rows and 4 columns.- The program should repeatedly display the following menu:A or a to add a toy to the bagV or v to calculate and display the total value of the toysW or w to calculate and display the total weight of the toysD or d to delete a toy from the arrayM or m to calculate and display the number of small toysN or n to calculate and display the number of medium toysL or l to calculate and display the number of large toysX or x to start filling a new bagP or p to exit programThe following functions need to be created and used in the program:- Void wipe(int cat[][4], int n);- Void populate(int cat[][4], int n);- Int size(int L, int W, int H);- Int check_capacity(int cat[][4], int n, int tsize, int tweight);- Int rm_toy(int cat[][4], int n, int toynum);- Int weight(int cat[][4], int n);- Int value(int cat[][4], int n);- Int small(int cat[][4], int n);- Int medium(int cat[][4], int n);- Int…Write a program in C as follows:- Create an array of integers named “toy” that has 120 rows and 4 columns.- The program should repeatedly display the following menu:A or a to add a toy to the bagV or v to calculate and display the total value of the toysW or w to calculate and display the total weight of the toysD or d to delete a toy from the arrayM or m to calculate and display the number of small toysN or n to calculate and display the number of medium toysL or l to calculate and display the number of large toysX or x to start filling a new bagP or p to exit program - Santa’s bag can hold 30 large toys or 60 medium toys or 120 small toys or any combination ofsizes that satisfy this requirement (ex: 29 large + 1 medium + 2 small would be max capacity).Also, the total weight of toys cannot exceed 620 Kgs. All values are entered in centimeters andgrams. (Hint: the return values of the size function should help you in calculating the bagcapacity.)The…The Lo Shu Magic Square is a grid with 3 rows and 3 columns. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 – 9 exactly The sum of each row, each column and each diagonal all add up to the same number. Write a program in C++ that simulates a magic square using 3 one dimensional parallel arrays of integer type. Do not use two-dimensional array. Each one the arrays corresponds to a row of the magic square. The program asks the user to enter the values of the magic square row by row and informs the user if the grid is a magic square or not. Processing Requirements - c++ Use the following template to start your project: #include<iostream> using namespace std; // Global constants const int ROWS = 3; // The number of rows in the array const int COLS = 3; // The number of columns in the array const int MIN = 1; // The value of the smallest number const int MAX = 9; // The value of the largest number // Function prototypes bool…
- . Write a complete C++ program, 1.1) The program contains three functions named F1, F2 and F3. 1.2) The function F1 takes a 2D character array with its sizes (number of rows and columns) and initializeittoempty character. 1.3) The function F2 takes the 2D array does the following, 1.3.1) Fill the rows whose sum of indexes (i , j) is equal to 20 with character ‘ + ‘. 1.3.2) Fill the columns whose sum of indexes (i , j) is multiple of 7 or 11 with character ‘ - ’. 1.3.3) Fill the rows whose sum of indexes (i , j) is greater than 30 and less 50 with character ‘ *‘. 1.3.4) Fill the last 5 columns with character ‘ . ‘. 1.4) The function F3 counts the number of empty characters, asterisks, addition symbols, subtractionsymbolsanddot symbols. Then the function returns the result to the main function.Please fast : Write a C program that reads 5 numbers from the user and store them in an array. Then you have to compute the square and cube of each number and store them in different arrays. Having computed the square and cube of the numbers, print each number with its square and cube value. Your program should include a function called get_square_cube, which will compute the square and the cube values of the numbers and store each in a different arrayplease explain each step and why each function is used thank you: Write a C program that generates an integer one-dimensional array of size 30, and populates the array with 30 random values in the range of 0 to 20, then gets an integer number, num, in the range of 0 to 20, from the user, and computes frequency of the given number, num, in the array, and finally displays the array and the frequency of that number
- Write a C++ function called displayArray7. The function should accept a two-dimensional array as an argument and display its contents on the screen, in row order. The function should work with any of the following arrays: int hours[5][7]; int stamps[8][7]; int autos[12][7]; int cats[50][7];Given an array with the name and element of array_num[7] = {5,6,1,12,5,5,12}. You are required to find the most occurred element in this array. The most occurred element has the following function prototype: int most_occurred (int array_num[], int n). Using a C program Please correct answerWrite a C++ program that allows a cosmetic company to keep track of six different products: lipstick, eyeshadow, mascara, eyeliner, foundation, and rouge. The program should use two-parallel 6-element arrays: an array of strings that holds the product names and an array of integers that holds the number items in each category sold during the last week. The product names should be stored using an initialization list at the time the array is created. The program should prompt the user to enter the number of each product sold. Once the sales data has been entered, the program should display sales for each product, total sales, and the names of the highest and lowest selling items. Input Validation: Do not accept negative values for the number of items sold.