Re: My problem in C
This should work:
#include <stdio.h>
void main()
{
for(int i=1;i<=5;i++)
{
//count forward
for(int j=1;j<=5-i+1;j++)
{
printf("%d",j);
}
for(int j=1;j<i;j++)
{
printf("-");
}
//count backward
for(int j=1;j<i;j++)
{
printf("-");
}
for(int j=5;j>=1+(i-1);j--)
{
printf("%d",j-(i-1));
}
printf("\n"); } }
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector