Forum gr 4 WMS
#include <stdio.h>
int main ()
{
char tab[4];
tab[0]='A';
tab[1]='A';
tab[2]='A';
tab[3]='A';
char max='D';
while (tab[0]<=max)
{tab[1]='A';
while (tab[1]<=max)
{tab[2]='A';
while (tab[2]<=max)
{tab[3]='A';
while (tab[3]<=max)
printf ("%c%c%c%c\n", tab[0], tab[1], tab[2], tab[3]);
tab[3]++;
}
tab[2]++;
}
tab[1]++;
)
tab[0]++;
}
tab[0]='A';
return 0;
}
//to jest wersja Iwonki <dziekowac> jak sa bledy to poprawic //
Ostatnio edytowany przez asiek (2008-03-17 18:53:32)
Offline
Zrodelko napisał:
#include <stdio.h>
int main ()
{
char tab[4];
tab[0]='A';
tab[1]='A';
tab[2]='A';
tab[3]='A';
char max='D';
while (tab[0]<=max)
{
tab[1]='A';
while (tab[1]<=max)
{
tab[2]='A';
while (tab[2]<=max)
{
tab[3]='A';
while (tab[3]<=max)
{
printf ("%c%c%c%c\n", tab[0], tab[1], tab[2], tab[3]);
tab[3]++;
}
tab[2]++;
}
tab[1]++;
}
tab[0]++;
}
tab[0]='A';
return 0;
}
Trzeba było pilnować nawiasów przy przepisywaniu albo poprosić o wysłanie programu na maila bo przepisywanie czegoś co już ktoś napisał to masa energii ...
PS
Oczywiście program działa po poprawieniu nawiasów, a autora poprawy proszę o wyjaśnienie jakim cudem program działał po tej zmianie bo nie ogarniam...
Ostatnio edytowany przez Iwonka=] (2008-03-17 22:06:42)
Offline