How to type with Pascal read into the number of lines n .

Updated on technology 2024-03-22
4 answers
  1. Anonymous users2024-02-07

    varn,i,j:integer;

    beginreadln(n);

    for i:=1 to n do beginfor j:=1 to i do beginwrite(‘*

    end;writeln;

    end;readln;

    end.Upstairs is wrong, what about the n variable.

  2. Anonymous users2024-02-06

    That's a bit of a problem.

    Why 4 rows are 2 stars and 5 rows are one star.

    You don't make it clear.

  3. Anonymous users2024-02-05

    This reading is wrong.

    Follow your way, and he will become.

    p[1].name='jason 1 1'

    p[1].x='herry'So it doesn't match the type, and you should do that.

    Put your for i:=1 to n do

    with p[i] do

    readln(name,x,y);

    Change to for i:=1 to n do

    with p[i] do

    beginreadln(st);

    name:=copy(st,1,pos(' ',st)-1);

    delete(st,1,pos(' ',st));

    val(copy(st,1,pos(' ',st)-1),x,code);

    delete(st,1,pos(' ',st));

    val(st,y,code);

    end;It's just a normal string process.

  4. Anonymous users2024-02-04

    vari,k,c:char;

    n:longint;

    beginreadln(n);

    c:=chr(n+64);Calculate the last letter for i:= in the last row'a'to c do enumerates the last letter of each row begin

    for k:=c downto succ(i) do write(' ');The first letter is also the last letter in the row, and the letter before this letter is a space, so the output space, succ() is used to take the successor, and you can get a letter after i.

    for k:=i downto 'a' do write(k);Print from the last letter of the row to A

    for k:='b' to i do write(k);Print from B to the last letter of the row, because A has already been printed and only one A is in the center of each row, so don't print repeatedly.

    writeln;After printing a row, wrap the line.

    end;end.

Related questions
10 answers2024-03-22

The specific steps are as follows:

1. First of all, the red box button is shown in the diagram for a simple **. The specified number of beats (1 2 4 8 16, up to 8 seconds) is then automatically recorded as shown in the figure below, and then proceeds to the next step. >>>More

11 answers2024-03-22

The five strokes of the character Xia are coded as: FNHC

The first root is "rain" on the F key, the second root is "fold", on the n key, the third root is "vertical" on the h key, and the fourth root is "again" on the C key. >>>More

24 answers2024-03-22

He has a celestial creature attack +2, and he must be the first, plus the shadow ground and the shadow ground, once he goes up, he puts the quantum extinction wave and kills it in seconds, and the upstairs says that it is impossible to wait for miss, this trick is a must, the shadow shield has no effect, and Cain has no chance to win, it is recommended to prepare Lisa's flash skin, Lisa's leaf green elimination strengthening, and then wait to hang up, and then flash the skin, because the ground hit the flight is 0, so he hits you with double damage, and after 3 times of red rhyme, he hits you up to 70 drops of blood, and then starts to move his wings and flutters, hang him up within 5 moves, and win.

7 answers2024-03-22

Hello! The purpose of nesting is to attract and retain fish. Therefore, the production of nest material should start from these two aspects. >>>More

10 answers2024-03-22

As long as the boss waved the hand back, it's OK.,The first boss smashes the ground.,You can dodge and then make a ghost hand.,The second boss swings a fist.,You have to grasp the right time to make a ghost hand.。。 In the end, the boss will jump up and use the ghost hand again.。。。