CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

C, printf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2010, 07:08
Default C, printf
  #1
New Member
 
marie
Join Date: May 2010
Posts: 21
Rep Power: 16
marye is on a distinguished road
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!
marye is offline   Reply With Quote

Reply

Tags
printf


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 04:43.