Fungsi For


#include <conio.h>
#include <iostream.h>
void main ()
{
inti, a=1 ,tmp;
for (i=1; i<=6; i++)
{
cout<<a<<"\t";
tmp=a;
a= i + tmp;
}
getch();
}

Hasil Runing : 1 - 2 - 4 - 7 - 11 - 16.... .... .... ....

:: ini bukan garapan ane sendiri cc :: Moch. Aris

0 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan