//boy3vil
//for
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int i, j, k, l, m, n, o, p, q;
for (i=0; i<10; i++)
{
printf("nilai for 1=%d\n",i);
}
printf("\n\n");
for (j=0; j<=10; j++)
{
printf("nilai for 2=%d\n",j);
}
printf("\n\n");
for (k=0; k<10;)
{
k++;
printf("nilai for 3=%d\n",k);
}
printf("\n\n");
for (l=10; l>0; l--)
{
printf("nilai for 4=%d\n",l);
}
printf("\n\n");
for (m=10; m>=10;)
{
m--;
printf("nilai for 5=%d\n",m);
}
printf("\n\n");
for (n=0; n!=10; n++)
{
printf("nilai for 6=%d\n",n);
}
printf("\n\n");
for (o=0; o<10;)
{
o++;
printf("nilai for 7=%d\n",o);
}
printf("\n\n");
for (p=10; p>0;)
{
--p;
printf("nilai for 8=%d\n",p);
}
printf("\n\n");
for (q=10; q>0;)
{
--q;
q--;
printf("nilai for 9=%d\n",q);
}
printf("\n\n");
return 0;
}
Categories:
blog,
c program,
pemrograman1