Browse Source

change loop range for simpler processing

master
T. Meissner 9 years ago
parent
commit
6c300d5acb
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      c_primer_plus/chapter06/04.c

+ 4
- 4
c_primer_plus/chapter06/04.c View File

@ -4,13 +4,13 @@
int main(void) { int main(void) {
unsigned char letter = 'A';
char letter = 'A';
for (unsigned char i = 0; i < 6; i++) {
for (unsigned char j = letter; j <= (letter + i); j++) {
for (char i = 1; i <= 6; i++) {
for (char j = letter; j < (letter + i); j++) {
printf("%c", j); printf("%c", j);
} }
letter += (i + 1);
letter += i;
printf("\n"); printf("\n");
} }


Loading…
Cancel
Save