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.

Recommended Answers

All 2 Replies

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?

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.