writing 6 items in one line.

"Ronen Kfir" <[email protected]>
Newsgroups gmane.comp.programming.cppug
Message-ID <[email protected]>
Hi, 
I have this code:


#include <stdio.h>
void main()
{
  int    i,n=40;
  float a=0,b=1;
  for (i=1;i<=n;i++)
  {
    printf("%.0f\n",a);
    printf("%.0f\n",b);
    a+=b;
    b+=a;
  }

  getch();
}

It present Fibonacci serial of 40 elements. Now I need to divide it to
groups of 6 in each row.

Please help me do it.

Cheers.



R o n e n   K f i r
System Administrator
CIT div. Tel Aviv University
Israel
Tel: 972-3-6407416
Fax: 972-3-6405158
cellular: 972-55-405910
E-mail: [email protected]
 
 




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com.  Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/EbFolB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/cppug/

<*> To unsubscribe from this group, send an email to:
     [email protected]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.