1 条题解

  • 0
    @ 2021-6-14 23:25:07

    C :

    #include<stdio.h>
    int main()
    {
        char a[3][5]={'a','a','a','a','a','b','b','b','b','b','c','c','c','c','c'};
        int i,j;
        for(i=0;i<3;i++)
        {
            for(j=0;j<5;j++)
                printf("%c",a[i][j]);
                printf("\n");
        }
        return 0;
    }
    
    

    C++ :

    #include<iostream>
    #include<cstdio>
    #include<string>
    #include<cmath>
    using namespace std;
    int main()
    {
        cout<<"aaaaa"<<endl<<"bbbbb"<<endl;
        cout<<"ccccc"<<endl;
        return 0;
    }
    
    

    Pascal :

    var i:char;j:longint;a:array['a'..'c',0..100]of char;
    begin
     for i:='a' to 'c' do
      begin
       for j:=1 to 5 do
        begin
         a[i,j]:=i;
         write(a[i,j]);
        end;
       writeln;
    end;{sdfsdfsdaf}
    end.
    

    Python :

    print 'aaaaa\nbbbbb\nccccc'  
    
    • 1

    信息

    ID
    151
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    递交数
    3
    已通过
    0
    上传者