Program Sederhana Perulangan dengan C

Ini adalah salah satu contoh program perulangan menggunakan bahasa C dengan perintah FOR

untuk listing atau script program silahkan copas aja di bawah ini Gratis tis tis!! hehehe

#include

#include

void main()

{

int b,d,e,f,g,h,i,j;

for(b=1;b<=5;b++)

{

{for(d=1;d<=b;d++)

printf(“*”);}

{for(e=5;e>=b;e–)

printf(“0″);}

{for(f=5;f>=e;f–)

printf(” “);}

printf(“\n”);

}

for(i=4;i>=1;i–)

{

{for(g=1;g<=i;g++) printf(“*”);} {for(h=5;h>=i;h–)

printf(“0″);}

{for(j=5;j>=h;j–)

printf(” “);}

printf(“\n”);

}

getch();

}

Posted on March 28, 2011, in Uncategorized. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: