#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
char tekst[] = "0123456789";
int i = 4, j = 9;
for(i++;i!=j;j-=1)
{
printf("%d ",j-(tekst[i]-'0'));
switch(tekst[++i-1])
{
case 9: printf("%c ", *(tekst+i)); break;
case 8:
case 7:
case 6:
case 5:
case 4:
case 3:
case 2:
case 1:
case 0: printf("%c ", *(tekst+j)); break;
default: break;
}
}
return 0;
}
Rozumiem dlaczego wyświetla 4 i 2, ale czemu po wyświetleniu 4 nie robi czterech odstępów bo jest case 4: i nie ma breaka aż do case 1 więc powinny chyba robić się odstępy ?