Aşağıdaki gibi görüntü veren program
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
KOD :
#include<stdio.h>
main()
{
int x;
for (x=1;x<6; x++)
{
if (x==2)
break;
printf(“%d”,x);
}
printf(“\n”);
for (x=1;x<6; x++)
{
if (x==3)
break;
printf(“%d”,x);
}
printf(“\n”);
for (x=1;x<6; x++)
{
if (x==4)
break;
printf(“%d”,x);
}
printf(“\n”);
for (x=1;x<6; x++)
{
if (x==5)
break;
printf(“%d”,x);
}
printf(“\n”);
for (x=1;x<6; x++)
{
printf(“%d”,x);
}
printf(“\n”);
system(“pause”);
}