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

Unique Matrix

You are given a N*N matrix. write a program to check if the matrix is unique or not. A unique Matrix is a matrix if every row and column of the matrix contains all the integers from 1 to N


Input:

The first line contains an integer N.

The next N lines contains N space separated values of the matrix.


Output:

The output contains a single line and should be True if the matrix is unique matrix and False otherwise.


Sample Input1

4

1 2 3 4

2 3 4 1

3 4 1 2

4 1 2 3

Sample Output1

True


Sample Input2

4

1 2 3 3

2 3 4 1

3 4 1 2

4 1 2 3

Sample Output2

False



Machine Problem 5.10

Write a program using one-­‐dimensional array that searches a number if it is found on

the list of the given 5 input numbers and locate its exact location in the list.

Sample input/output dialogue:


Enter a list of numbers: 5 4 8 2 6

Enter a number to be searched: 2 2 found in location 4


Machine Problem 5.9

Write a program using two-­‐dimensional arrays that computes the sum of data in rows and sum of data in columns of the 3x3 (three by three) array variable n[3[3].

Sample input/output dialogue:

5 9 8 = 22

3 8 2 = 13

4 3 9 = 16

-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐

12 20 19


What's in There?

by CodeChum Admin

Let's try defining the size of the array and create the contents of it on our own! And then, to give off a sense of excitement, let's try accessing the value of an array element in a random index position!


Let's do this fast!


Instructions:

  1. Create an empty character array with a size of 100.
  2. Use an appropriate input function for strings and store the value into the empty array.
  3. Input a random integer. It shall only be any integer that's less than the string's length.
  4. Using your understanding on accessing list elements, access and print out the array element having the index position of the inputted random integer

Input


1. A string

2. An index

Output

The first line will contain a message prompt to input the string.

The second line will contain a message prompt to input the integer which represents the index.

The last line contains the character at the index.

Enter·the·string:·Cody
Enter·the·index:·3
Character·at·index·3·=·y




Let P be a linked list.Write a C++ function callef split to create two linked lists Q and R.Q should contain all elements in odd position of P and R contains remaining elements.Your Function should not change list p.What is the conplexity of your program.

Design a program that will ask the user to give three numbers and then the program will determine which of the three numbers has the highest in terms of numerical value using termary operator



// maximum.cpp


// Author: Mr jake R. pomperada, BSCS, MAED- IT


// Date: august 23, 2018 Thursday 10:55 pm


// Location: Bacolod City, Negros occidental


// Website: http://www.jakerpompereda.com



A company named Best Options is doing an analysis of its 10 best sales representatives. The analysis is important for the company to search for the best salesperson among them. The particular salesperson will be awarded a token of appreciation from the company. A computer program is required to assist the company in doing the analysis. Write a complete C++ program to do the following:

(a) Declare three arrays, namely StaffName of type string, StaffID of type integer and Sales of type double. The entire array’s size is 10.


(b) Prompt the user to enter the salesperson’s name, staff ID and their respective sales, and store into the arrays. Staff name will be stored in array StaffName, staff ID will be stored in array StaffID while sales will be stored in array Sales.

(c) Find and display the average sales of the 10 sales person.


(d) Print the staff name, ID and the amount of sales of the sales person with the highest sales.



5. Survival of the Biggest (while loop)

by CodeChum Admin

Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.

Think you can handle the job?


Instructions:

  1. Input a non-zero positive integer.
  2. Using the same concept as the previous problem, figure out how to separate the digits of a number and determine which of the digits is the largest one, using a while. Afterwards, print the largest digit.
  3. Tip #1: Create another variable that will hold the largest digit. Initial its value to a negative integer, like -1, outside the loop.
  4. Tip #2: Everytime you get the rightmost digit, check if it is greater than the current largest digit. If it is, set it as the new largest digit.

Write a console application that initialize at least five variables or constants with different data types, the displat thier value.Provide a meaningful identifier of the variables or constants.Name the namespace as DataTypeApp and its class as DataTypeProgram

Which parameter should be removed from this line, that strives to overload the * operator? Type the parameter name only; don't list the type.

TimeHrMn TimeHrMn::operator*(TimeHrMn lhs, TimeHrMn rhs) {


LATEST TUTORIALS
APPROVED BY CLIENTS