Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.343 kB
#include <stdio.h>
int
main(int argc, char *argv[]) {
int i, j;
int matrix[3][3] = {
{1, 1, 1},
{0, 1, 1},
{0, 0, 1}
};
int vector[3] = {1, 2, 3};
int result[3] = {0, 0, 0};
for(i=0; i<3; i++)
for(j=0; j<3; j++)
result[i] += matrix[i][j] * vector[j];
printf("%d\n%d\n%d\n", result[0], result[1], result[2]);
return 0;
}
Jump to Line
Something went wrong with that request. Please try again.