Write a function that categorizes negative and positive numbers of a given innial array into two separate arrays with sufficient allocated array space. Write the main program using the upper function in two cases:
The input array is a static array with the value of the given elements.
The input array is a dynamic array with the value of elements entered from the keyboard
Displays two arrays of results to the screen.
Defines a function that saves elements of a real number array in the opposite direction, declaring the function as void Reverse (double arr[], const int size, double*& rev). Write the main program using the upper function.
Write a function that sums each pair of elements of 2 arrays (plus correspondingly by index), resulting in a third array. Arrays have the same number of elements. Write the main program using the upper function and display the results to the screen
Write a function that saves even numbers of an innuation array foreground to another with sufficiently distributed array space. Write the main program using that function in 2 cases:
The input array is the static array with the given elements
The input array is a dynamic array with the number of elements and elements imported from the keyboard
Displays the resulting array to the screen
two user defined functions to receive credit for this assignment.
Applications for mobile devices (Mobile Apps) are in great demand. You have been tasked to design an
algorithm and write a C++ program to help programmers track the sales of a Mobile App. The program
must prompt the user to input the following:
Name of mobile application
Price of a Full version download
Price of a Trial version download
Number of Full version downloads
Number of Trial version downloads
Tax Rate
The program will allow the user to calculate the total net earnings based on the price and number of
download purchases, and the tax rate. Use the following equations to calculate the total net earnings:
Gross earning total
= Price of a Full version * Number of Full version downloads
+ Price of a Trial version * Number of Trial version downloads
Tax deduction = Gross earning total * Tax Rate / 100
Total Net earnings = Gross earning total - Tax deduction
The program must output the results to the screen and to an output file named "
static member function
A class named “Teachers” holds information like teacher code, name, gender, year of joining. Write a program to create five hundred objects (Array of teacher objects) of teacher and enter some data into it through setters. Make getters and setters for all employee information. Then ask the user to enter current year. Display the names of those employees whose tenure is 10 or more than 10 years according to the given current year only using getters.
Write a C++ code to read a line of string as an input and do the following operations. Do proper input
validation to your input.
i) Capitalize first and last character of each word in the given string. [3 Marks]
ii) Delete a word from the given string. Popup a message if the string is empty. [5 Marks]
iii) Add a word in the middle of the given string. Capitalize the new word if it already exists. [5 Marks]
For proper input validation
Write a C++ code to read a line of string as an input and do the following operations. Do proper input validation to your input. i) Capitalize first and last character of each word in the given string. [3 Marks] ii) Delete a word from the given string. Popup a message if the string is empty. [5 Marks] iii) Add a word in the middle of the given string. Capitalize the new word if it already exists. [5 Marks] For proper input validation
Write a top-level program for creating a GRAPH instance and running both Prim’s and Kruskal’s algorithms on it, and printing out the respective MSTs returned, along with the total cost and runtime (in milliseconds) for each one. The input to this top-level program 1 should be an n × n cost matrix for a graph, n being the number of vertices (assume the diagonal elements will always be 0, and elements corresponding to unconnected vertices will be set to −1); this can be read in from a text file. A sample input file is provided at http://web.iitd.ac.in/~sumeet/input_graph.txt).