Can you assist me in writing this Java syntax in Pascal?
A[m] = scan.nextInt();
This program will request the length of the array and then the items in it from the user. This code was written by me:
WriteLn('How many Number you would like to sort:');
ReadLn(size);
For m := 1 to size do
if m = 1 then
Begin
WriteLn;
WriteLn('Input the first value: ');
End;
I had no idea how to finish it, but I was familiar with the Java syntax.
for(m = 0; m<size; m++)
{
if(m == 0)
{
System.out.println("");
System.out.print("^_^ Input The First Value:");
A[m] = scan.nextInt();
}
else if(m == size -1)
{
System.out.print("^_^ Input The Last Value:");
A[m] = scan.nextInt();
}
else
{
System.out.print("^_^ Input The Next Value:");
A[m]= scan.nextInt();
}
}