-
-
Save kunpengku/5647712 to your computer and use it in GitHub Desktop.
some usage of for
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
char i,j,k; | |
for(i = 0; i < 6; i++) | |
{ | |
for(j = 'F',k = 0; j >= 'A',k <=i; j--,k++) //一个for里可以干多件事情,相反也行. | |
{ | |
printf("%c",j); | |
} | |
printf("\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment