answersLogoWhite

0

Matrices have two diagonals: main diagonal and anti-diagonal. The main diagonal runs from top-left to bottom-right. For square matrix A:

// main diagonal:

for (size_t xy=0; xy<A.size(); ++xy)

cin >> A[xy][xy];

// anti-diagonal

for (size_t x = A.size()-1, y=0; y<A.size(); --x; ++y

cin >> A[x][y];

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Using the periodic chart indicate the most common charge of elements. Type the correct answer then press Enter. (Include plus or - where necessary.)?

A+ (+2)


using one stroke make the number statement true 5 plus 5 plus 5550?

There is no statement: there is only an expression. But usually such questions are answered by putting a diagonal stroke through the "=" sign (if there is one), to make it "&acirc;&permil;&nbsp;".


Correct formula in singe stroke 5 plus 5 plus 5 equals 550?

Put a diagonal line through the equals sign to make it "does not equal".


How many Essential Elements 2000 Bb Clarinet Books do they have?

There are only two: Essential Elements 2000 Bb Clarinet Book 1 Plus DVD and Essential Elements 2000 Bb Clarinet Book 2 with CD.


How do you find the length of the diagonal of cube if side is given?

diagonal can only be found if two sides are known, imagine if you only have one known side ,the other side could be of any length and therefore the diagonal could be any length. if two sides are known then use pythagoras, as the two sides make up the 'adjacent' and 'opposite' side of a right angled triangle e.g. side a=2, side b=4 side c is square root of 2x2 plus 4x4 i.e root of 4+ 16=20 which is approx 4.47


How old do you have to be to enter xfactor?

16 plus...


Correct this formula with a single stroke 5 plus 5 plus equals 550?

Putting a top to bottom diagonal strike through the equals sign ( &acirc;&permil;&nbsp; ) makes the sum 5 plus 5 is unequal to 550.


What does shift plus enter do?

Trys to delete your family


What is the answer to Excel explain how to enter the formula C4 plus B5 plus D2 in cell D3 using the point-and-click method?

You will enter the formula by chosing summation and then clicking the cells, while on cell d3, click enter.


Which function is used to remove all elements from a map in c plus plus?

map.clear()


What is the length of the diagonal of court with length 20 feet and width 15 feet?

25 feet Pythagorean theorem says length of diagonal is square root of (width squared plus length squared). This is a 3-4-5 ratio right triangle


If I enter an online shopping Internet if they put 11.99 does that mean I have to pay 11 only?

No, if an online price says $11.99, then you will have to pay that amount, plus taxes if applicable.