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
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:
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·=·yLet 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.
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:
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) {