1 条题解
-
0
C++ :
#include<iostream> using namespace std; int main() { int t; //t:统计已输出字符个数 t=0; for (char c='a';c<='z';c++) //顺序输出 { cout<<c; t++; if (t%13==0) cout<<endl; //每输出13个字符换行 } t=0; for (char c='z';c>='a';c--) //倒序输出 { cout<<c; t++; if (t%13==0)cout<<endl; } return 0; }
Pascal :
program aa; begin writeln('abcdefghijklm'); writeln('nopqrstuvwxyz'); writeln('zyxwvutsrqpon'); write('mlkjihgfedcba'); end.
Java :
class Main { public static void main(String[] args) { for(int k=97;k<=109;k++){ System.out.print((char)(k)); } System.out.println(); for(int j=110;j<=122;j++){ System.out.print((char)(j)); } System.out.println(); for(int j=122;j>=110;j--){ System.out.print((char)(j)); } System.out.println(); for(int j=109;j>=97;j--){ System.out.print((char)(j)); } } }
- 1
信息
- ID
- 697
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者