Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a Javascript program that asks the user to enter up to 10 golf scores, which are to be stored in an array. You should provide a means for the user to terminate input prior to entering 10 scores. The program should display all the scores on one line and report the average score. Handle input, display and the average calculation with three separate array processing functions

For this task you are asked to write a program that consists of a le recap.cpp and a

make le to compile and run it. You will need to include a blank data.txt le in your

submission as well. Your make fille must compile the executable as main. You are required to read this data, line by line, into a 2D dynamic array of strings.

The format of the line is as follows:

1,a,b,c,d

Each line starts with an ID, which is an int, and then will be followed by an unknown

number of strings separated by commas. Each string in the line is associated with the ID

of the line. Each line will have at least the ID and 1 item.

Once the items are stored in the array you need to print out the array in ascending order

based on the order IDs in the following format:

ID,a,b,c

An example of this output is as follows (for 2 orders):

3,toaster,iron

4,spanner,wrench,hammer

Terminate each line of output with a newline.

The following libraries are allowed:

- iostream

- fstream

- string

- sstream


I was given inputs as 10,9,8,7
I get maximum number as 9. How to solve this problem
Given the following declaration:
int j;
int sum;
float sale[10][7];
which of the following correctly finds the sum of the elements of the fifth row of sale?
1. sum = 0;
for(j = 0; j < 7; j++)
sum = sum + sale[5][j];
2. sum = 0;
for(j = 0; j < 7; j++)
sum = sum + sale[4][j];
3. sum = 0;
for(j = 0; j < 10; j++)
sum = sum + sale[5][j];
4. sum = 0;
for(j = 0; j < 10; j++)
sum = sum + sale[4][j];
Write a C++ program to check if 2 matrices are same b overloading == operator.
Two matrices A and B are said to be same if Aij = Bij for 0<=i,j<=n-1.
Create a class Product with <PID, cost, quantity> as member
variables. Create a parameterized constructor to assign default values for
quantity and cost and assign consecutive PID starting from 100. Create a copy
constructor, and a destructor, findMaxProduct()as a friend function that
takes an array of N Products as parameter and returns the product with
maximum quantity, getProduct() to read quantity and cost details,
printProduct() to print product details, as member functions. In main()
create an array of Product objects and call findMaxProduct()appropriately
and print the details of the product with maximum quantity.
Assume the following declarations
const int NUMROWS = 3;
const int NUMCOLS = 4;
int val[NUMROWS][NUMCOLS]={8,16,9,52,3,15,27,6,14,25,2,10};
Which statement will change the value of the element with the value 27 to 55.
1. val[0][1] = 55;
2. val[1][2] = 55;
3. val[2][1] = 55;
4. val[1][1] = 55;

Definition

For this question we have to write MATLAB code to detect a scalene triangle by reading in three numerical values representing the lengths of the three sides and printing “it’s a scalene” if the triangle is not an isosceles or equilateral triangle and the sum of any two side’s length is greater than the length of the other side.

Testing

On paper, or in a text file, write three new tests for the above program. As an example, three tests for this program might be.

inputs output
5 5 5  <no output>
2 1 2  <no output>
3 2 1  <no output>
3 4 5  “it’s a scalene”

Coding

If you are sharing a computer, swap a new group member to the terminal. Write a MATLAB script called q6.m that implements the definition above using at least if-statements. 


Definition:

In this question we define code that reads in three positive numbers representing the lengths of the sides of a triangle and prints out a message saying “it’s equilateral” if all three sides are of equal length.


Testing:

On paper, or in a text file, write three new tests for the above program. As an example, two tests for this program might be.


inputs output
5 5 5  “it’s equilateral”
2 1 2  <no output>

Prefix Suffix

Write a program to check the overlapping of one string's suffix with the prefix of another string.

Input

The first line of the input will contain a string A.

The second line of the input will contain a string B.

Output

The output should contain overlapping word if present else print "No overlapping".

Explanation

For example, if the given two strings, A and B, are "ramisgood" "goodforall"

The output should be "good" as good overlaps as a suffix of the first string and prefix of next.

Sample Input 1

ramisgood

goodforall

Sample Output 1

good

Sample Input 2

finally

restforall

Sample Output 2

No overlapping




LATEST TUTORIALS
APPROVED BY CLIENTS