0
 for i := 1 to n do
     for j := 1 to n do
         C[i, j] := A[i,j] + B[i, j]









#include <iostream>
#include <iomanip>
using namespace std;

int SIZE = 10;

double Sum(double matrixA[SIZE], double matrixB[SIZE])
{
int i = 0;
int j = 0;
double rows, columns;
double rows2, columns2;
double matrixC[SIZE][SIZE];

if(rows == columns2 && rows2 == columns)
{


for(i = 0; i < rows2; i++)
{
for(j = 0; j < columns2; j++)
{
{matrixC[i][j] = matrixA[i][j] + matrixB[i][j];




}
}
}
}

It's not quite the same. I'm not sure about the do loops here. Does anyody know? There's no output needed.

BTW. Would not let me post it without the pseudo code being in the "code" brackets.

Edited by XodoX

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by XodoX
0

It's not quite the same.

Meaning what, exactly? Are you doing a conversion but not sure your conversion is accurate? Are you getting errors when running it? Unexpected behavior? What's not right that you want fixed?

0

Never-mind. I think I got it. How do I exactly measure the time of the execution using System.currentTimeMillis() ? Can I use this one?

Edited by XodoX

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.