c语言
#include<stdio.h>
int main(){
int i,j;
int a[10];
for(i=0;i<10;i++){
for(j=0;j<10;j++){
scanf("%d",&a[i][j]);
}
}
}
java
public class Shuzu
{
public static void main(string args[] )
{
java.util.Scanner=new java.util.Scanner(System.in);
int list[]=new int[10];
for(int I=0;i<10;i++)
{
list[I]=input.nextInt();
}
}
}
c++
#include
using namespace std;
int main()
{
int i;
cout<<“please put number in it:”;
int a[10];
for(i = 0; i < 20; i++)
{
cin>>a[i];
}
for(int n = 0; n < i; n++) {
cout<<a[n];
}
return 0;
python
n=int(input())
for I in range(n):
a[I]=int(input())
Delphi
var
I: Integer;
StutCount: Integer;
ScoreList: array of Integer;
begin
StutCount := 50;
SetLength(ScoreList, StutCount);
// set the score list
for I := 0 to StutCount - 1 do
begin
ScoreList[I] := Random(100);
end;
// print the score list
for I := 0 to StutCount - 1 do
begin
ShowMessage('Stut Index: ’ + IntToStr(I + 1) +
#13#10 + 'Socre Value: ’ + IntToStr(ScoreList[I]));
end;
// to finalize the score list
SetLength(ScoreList, 0);
end;
五种语言写数组
最新推荐文章于 2023-04-25 00:48:32 发布