Pascal Programming Middle School Fundamentals

Updated on technology 2024-04-12
15 answers
  1. Anonymous users2024-02-07

    The system will not treat those two as the same array, it should be defined by type, and then both arrays should be defined as type.

  2. Anonymous users2024-02-06

    The program header writes:

    typearr=array[1..1000]of integer;

    Then write in the process.

    procedure find(s:arr);

  3. Anonymous users2024-02-05

    The array s:array[1.] cannot be defined directly in the process variables1000] of integer, first type: a:array[1..1000] of integer;

    Otherwise, the system won't treat the two as the same array.

  4. Anonymous users2024-02-04

    Upstairs is right, string will explode.

    You can use ansistring, basically it won't explode!

    **As follows: Program ANS;

    vars:ansistring;

    beginreadln(s);

    writeln(s);

    end.That should do the trick! It's basically not going to explode.

    Watchtower Lord!

  5. Anonymous users2024-02-03

    varn:longint;

    beginreadln(n);

    write(n);

    end.I'll be the first, give it to me

  6. Anonymous users2024-02-02

    The answer upstairs is not complete, your n is just a longint, in case the number entered is too large, it will explode, it should be:

    varn:string;

    beginreadln(n);

    writeln(n);

    end.

  7. Anonymous users2024-02-01

    OMG, why did I see it so late!!

    The two upstairs meant it right.

    But the brother on the first floor, don't grab the score like this, okay? It's ugly!!

    Brother Ren on the second floor, string will also explode.

  8. Anonymous users2024-01-31

    y001:n in the range 0program y001;

    var i,n:integer;

    a:array[1..10000]of real;

    he:real;

    beginread(n);

    for i:=1 to n do a[i]:=1/i;

    he:=0;

    for i:=1 to n do he:=he+a[i];

    writeln(he:5:5);

    end.Y002: n is the number of hail years, and t is 10,000 tons.

    program y002;

    var n,i:integer;

    t:real;

    beginn:=2005;

    t:=3886;

    for i:=2000 to n do

    t:=t*;

    writeln(t*10000:5:5);

    end.Y003: n is the number of liquid in the middle of the year, m is the number of money.

    program y003;

    var n,i:integer;

    m:real;

    beginread(n);

    m:=100;

    for i:=1 to n do m:=m*;

    writeln(m:5:2);

    end.y004 said: Actually, it's the same as y003 is to sell more town things to make a judgment.

    program y004;

    var n,i:integer;

    m:real;

    beginread(n);

    m:=100;

    if n<5 then

    for i:=1 to n do m:=m*else for i:=1 to n do m:=m*;

    writeln(m:5:2);

    end.

  9. Anonymous users2024-01-30

    Registration is required, and the questions in the popularization group are what you want.

    Noip is allowed with pascal, c, and c++, so it doesn't matter.

    You can just select pascal when you submit.

  10. Anonymous users2024-01-29

    First of all, it is very important to choose a good book, "Basic Course on Using Algorithms" is okay, and there are also black books are not bad.

    Then, master the basic algorithm, the more important ones are: dp (although 2009noip did not take the test, but look at the previous questions have 1 question), divide and conquer, deep search and wide search, and backtracking, and recursion (as important as dp), fast row and high-precision suggestions to memorize, practice is very important, generally get 1 = students are at least do more than 200 questions, it is very important to rely on the topic to improve, there are currently oibh and vijos and other ** can be referenced.

    Thirdly, the team is very important, rely on the seniors to help you, make up for the shortcomings, don't know where to ask, and you will improve quickly in the subject of information.

    Finally, you must also have a good attitude, the examination room generally sits 90+ people, some people will deliberately type very hard in order to be brave, if the master sits next to it will be very depressing, so usually exercise! It's been writing for so long, give it to me.

  11. Anonymous users2024-01-28

    Learn other languages, such as C

    Learn again. Data structure.

    Algorithm Windows programming.

    databases and much more.

  12. Anonymous users2024-01-27

    1.Use the root finding formula. The program is given below (the result is kept to 2 decimal places): var a,b,c,d,x1,x2:real;

    beginreadln(a,b,c);

    d:=sqrt(sqr(b)-4*a*c);

    x1:=(-b+d)/(2*a); x2:=(-b-d)/(2*a);

    writeln(x1:2:2); writeln(x2:2:2);

    end.2.Simple sorting.

    var a,b,c,t:integer;

    beginreadln(a,b,c);

    if aif aif bwriteln(a,' ',b,' ',c);

    end.3.Simple loops.

    var i,s:integer;

    begins:=0;

    for i:=1 to 100 do

    if i mod 2=1 then

    s:=s+i;

    writeln(s);

    end.

  13. Anonymous users2024-01-26

    You're going to have to simulate it yourself.

    Start with an extra "1".

    Go to repeat...until.

    The first time n=0, only do n:=n+1;

    The second time n=1, do both sentences, as s:=s+1 n; , s has become 2, and n is still 1, which is obviously not right.

    The best way to change your program is to set the default value of s to 0.

    Personally, I think it is more reasonable to modify it to the following one, and the idea is a little smoother.

    var k,s,n:real;

    beginreadln(k);

    n:=0; s:=0;

    repeat

    n:=n+1;

    s:=s+1/n;

    until s>k;

    writeln(n:0:0);

    end.

  14. Anonymous users2024-01-25

    0 should be assigned to the initialization of s, otherwise 1 will be added 2 times.

  15. Anonymous users2024-01-24

    In this way, the simulation efficiency is too low, try to use mathematical methods, otherwise you will time out when k is large.

Related questions
25 answers2024-04-12

halt: Exit the program.

exit: exit the process and function. If you are in the main program, the effect is the same as HALT. >>>More

12 answers2024-04-12

It is recommended to buy Tan Haoqiang's C language book, and you have to be patient... When I first came into contact, there were a lot of things I didn't understand, don't be discouraged, continue to look at the bottom, I really can't understand it, don't think about it. Go out and have fun, and in the process of playing, don't think about problems... >>>More

23 answers2024-04-12

Hello, you can learn programming.

Graduated from junior high school, you can learn computer-related majors, now is the Internet era, the prospects in this area are better, and learning technology is regardless of age and education, as long as you are interested, you can learn, zero foundation can also be learned! >>>More

4 answers2024-04-12

Learning pastry is a great job, a pastry chef is a job that requires aesthetics and patience, and it is very clean, and the environment is warm and sweet every day. Who doesn't like to be accompanied by food? Why not live on your own petty bourgeoisie with your own hands?

14 answers2024-04-12

You can buy new concept English textbooks for self-study, this is the best self-learning English textbook in the world, divided into one, two, three or four volumes, you haven't graduated from junior high school, it's best to buy all four volumes, one by one to learn, when there is a full set on the Internet, it looks like forty or fifty yuan. If you work hard, you can finish it in two years, in fact, you can learn the third book is almost the same, because the fourth book is more difficult, and you can continue to study if you want to take English level 6, IELTS or something. >>>More