السلام عليكم ورحمة الله وبركاته
أرجوا منكم تصحيح الكود
هذا السؤال::
write a program to do the following:
Declare & read an array of k elements
Interchange elements such that the last is replaced with the first
Ex.15,2,4,0,3,7
become 7,3,0,4,1,2,15
Note :operation are done on the same array
set the physical size to 10,read the effective size x
the program will only cnsider the effective size
public class Intarray
{
public class void main (string[]args)
{
final int a=10;
int []array =new int [a]
for (int c=0;c<array.lenght;c++)
System.out.printf("%d";array[c]);
for(int i=10;i<=array.length;i--)
System.out.printf("%d",array);
}
}
