~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Man is foolish.
Suspicious girls of Egypt inhale ancient dust while stalking smart actors.
marred
spoon - feed
You get favs.
I put in sands of time.
Are you saying your peers frown upon the use of stimulants such as caffeine?
Kind of...yes. :D
Assuming that the condition is "The loop should only be executed again (since its a do while loop) when the first is less than second AND the third is not equal to fourth OR when the number of iterations is still less than 5", you should have something like this:
// will be executed atleast once
do
{
// something
}
while ((first < second && third != fourth) || (iterations < 5)) ;
Correct use of parantheses makes the expression logically correct as well as more readable.
When on a project I drink 6 cups of tea / 10 cups of coffee. Accelerates my thinking process and increases the dependence of something which is frowned upon by my peers... ;)
Hey there my friend, welcome to Daniweb.. :D
surf
Linux is growing.
An invention this
Suspicious girls of Egypt cough fragile dust while imitating posh actors.
ill communication - concussion
You get to decorate NYC with it.
I put in daffodils.
I am evil.
Jnabeel, the problem in your case is arising because of faulty logic. You need to place three loops to create a generic matrix multiplier. Read up on matrix multiplications here.
A sample implementation I came up with:
// UNTESTED
#include <iostream>
#include <iomanip>
int main()
{
using namespace std;
const int ROWS_FIRST_MATRIX = 3 ;
const int COLS_SECOND_MATRIX = 3 ;
const int COLS_FIRST_MATRIX = 3 ;
int mat1[3][3] = { {1,2,3}, {4,5,6}, {7,8,9} } ;
int mat2[3][3] = { {1,2,3}, {4,5,6}, {7,8,9} } ;
int mat3[3][3] = { 0 };
for (int i = 0; i < ROWS_FIRST_MATRIX; ++i)
{
for (int j = 0; j < COLS_SECOND_MATRIX; ++j)
{
for (int k = 0; k < COLS_FIRST_MATRIX; ++k)
{
mat3[i][j] += mat1 [i][k] * mat2 [k][j] ;
}
}
}
for (int i = 0; i < ROWS_FIRST_MATRIX; ++i)
{
for (int j = 0; j < COLS_SECOND_MATRIX; ++j)
{
cout << setw (5) << mat3 [i][j];
}
cout << endl ;
}
getchar ();
return 0;
}
Renowned girls of Egypt cough fragile dust while imitating slick cats.
Exist for a reason.
turion
You get Avada Kevadra.
I put in some rice.
brother jesus - blood brothers
the only thing
You get 13th of Friday.
I put in some candles.
scent
Die and let live.. ;)
a place humans should not go - Heaven
counting the pebbles.
You are granted forgiveness.
I put in world peace.
Live and let live.
Renowned girls of Egypt cough moldy dust while imitating slick, Cairo cats.
Fight of Icarus - Iron Maiden
Excellence..or was it excellent ?
squid - octopus
Renowned pharaohs of Egypt exchange moldy dust while imitating slick, Cairo cats.
You get quality sound.
I put in a priest.
orient
Hello.
Its okay friends, everyone has his / her own opinions. Starting a distro war would just result in getting this thread closed or someone getting infracted. I hope you guys understand...
Have a nice day.
Why don't you just follow the outline of the Cooley-Tukey algo?
Do you seriously think he expected an answer...
sushi - sweet
the same old
by running a
prudent
Here to stay - Korn
Midnight is when I am fully operational.
Your problem is that the newline character ( '\n'
) which remains in the input stream after you give the choice (yes or no) is picked up by the getline
function and hence your program fails to run as expected.
Either place a getchar ()
after the cin >> response
statement or resort to better methods of accepting input from the user.
And btw, using system ("pause")
is not good choice for making the console window stop, better use getchar ()
again or cin.get ()
.
The end is here - Alterbridge
Renowned pharaohs of Egypt exchange magic dust while breeding slick, Cairo cats.
You get a gal called Kimberley.
I put in some strawberries.
kind of help.