|
[Sponsors] |
June 1, 2010, 07:08 |
C, printf
|
#1 |
New Member
marie
Join Date: May 2010
Posts: 21
Rep Power: 16 |
Hi,
I'm new in C, so I try do to something easy but I have a problem... I've created the matrix P : P[0][0] = 2; P[0][1] = 0; P[0][2] = 0; P[1][0] = 0; P[1][1] = 2; P[1][2] = 0; P[2][0] = 0; P[2][1] = 0; P[2][2] = 2; And then, for(i=0;i<3;i++) for (j = 0; j < 3; j++) printf("P[%d][%d],%d ",i,j,P[i][j]); printf("\n"); doesn't returm the correct values.. If someone could help me, Thank you! |
|
Tags |
printf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM and gpgpu | dewald | OpenFOAM | 37 | August 29, 2014 10:32 |
Slip boundary around circles | zhoubinwx | OpenFOAM Running, Solving & CFD | 50 | March 2, 2013 07:59 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 04:01 |
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found | piprus | OpenFOAM Installation | 22 | February 25, 2010 14:43 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 08:21 |