A program problem 20, how to do the program problem

Updated on educate 2024-04-08
8 answers
  1. Anonymous users2024-02-07

    private object mytest(int max,int space)

    arraylist temp = new arraylist()for(int i = 1 ; i <= max ; i++)

    int count = 0 ;

    int num = 1 ;

    while( >1)

    if(num == space)

    num = 1 ;

    continue;

    if(count ==

    count = 0 ;

    num++continue;

    elsenum++

    count++

    return temp[0] ;

    What does programming language mean?

  2. Anonymous users2024-02-06

    What does the question have to do with the previous one?

  3. Anonymous users2024-02-05

    Summary. Hello, the following steps are required to write a program question: 1. First, read the question, figure out the requirements of the question, and clarify the solution to the problem; 2. Secondly, according to the requirements of the topic, determine the structure of the program, and determine the input and output of the program; 3. Then, according to the structure of the program, write the ** of the program; 4. Finally, run the program, check the correctness of the program, and modify the errors in the program until the program runs correctly.

    Hello, the following steps are required to write a program question: 1. First, read the question, figure out the requirements of the question, and clarify the solution to the problem; 2. Secondly, according to the requirements of the topic, determine the structure of the program, and determine the input and output of the program; 3. Then, according to the structure of the program, write the ** of the program; 4. After the fastest draft, run the program, check the correctness of the program, and modify the errors in the program until the program runs correctly.

    Hello dear,**Preview can't preview, please convert the text in order to better answer for you.

    Randomly input the radius r of the circle, find the surface of the slag grinding line such as the circle such as the bucket product and the perimeter, description, the pi value is an integer 3, the radius, area and perimeter are all taken as an integer, and the output radius: 3. The output shows that the area of the circle is 27 and the circumference is 18

    Hello Paibi, according to the title, we can get the following program: pythonimport random random random radius r = 3 calculate area and perimeter pi = 3area = int(pi * r * r) perimeter = int(2 * pi * r) output result print("Radius: {}format(r))print("The area of the circle is {}"format(area))print("The circumference is {}"format(perimeter)) outputs the following:

    Bulu Radius: 3 circles with an area of 27 and a circumference of 18

  4. Anonymous users2024-02-04

    First result = 0. When a variable in an expression has suffix auto-increment and auto-decrement operations, the expression is calculated based on the original value of the variable, and then the variable is auto-incremented and auto-decrement. Similarly, when a variable in an expression has a prefix increment and decrement, the variable is incremented and decremented first, and then the expression is calculated based on the variable's new value.

    According to this convention, to find the expression (i--)i is to calculate the value of i-i to 0, and then self-subtract i. In this way, the value of the expression (i--)i is 0

    The second, m=0, n=1Because (m=a>b) to find a>b first, because a=b=1, so a>b is false, in the computer, false is 0, so it is m=0, here = is the meaning of the assignment, not equal, that is, the value of 0 is assigned to m, because if the sign & is the first is correct, then the latter is not counted, so the (n=a>b) step will not be carried out, so n is still equal to 1

    There's not much to say, it's just a matter of comparing the priorities of the symbols. I suggest you take a look at this part of the knowledge.

  5. Anonymous users2024-02-03

    The i---i value should be 3-2 =1;Because the priority of --is higher than -.

    m=a>b)&&n=a>b)" value should be 0

    Because the priority ratio of " and " = is high, a>b is calculated first, and the value of a>b is 0, so m and n are 0 at the end

  6. Anonymous users2024-02-02

    The first question didn't understand what you were trying to say, i -- is i minus 1 after the program was executed

    i is i minus 1 before the program is executed

    Question 2 > The priority is higher than = , so after m=a>b, m=0, and in the same way, n=0

  7. Anonymous users2024-02-01

    When y. Just run z=x-y, which is z = 10-20

    The result is -10

  8. Anonymous users2024-01-31

    Select bs=0, n=1;s=√3/2,n=2;s=√3,n=3;s=√3,n=4;s=√3/2,n=5;s=0,n=6

    6 as a group, loop, 2016 divided by 6=336, exactly divisible, that is, when n=2016, it is executed exactly to the last number of a loop, s=0, at this time n=2016;Then go to the execution of the loop, n is less than or equal to 2016, that is, continue to execute the loop, at this time, the wild eggplant should be s equal to the first number of the cycle 0, the execution of the judgment, n = 2017, jump out of the loop, and the acceptance of the s=0

Related questions
6 answers2024-04-08

Good question, write with a for loop and judgment statement. >>>More

7 answers2024-04-08

In fact, there are many ways to express it:

joe,can you play football with me? >>>More

13 answers2024-04-08

The British constitution stipulates that Britain is a constitutional monarchy, and an important provision of the constitutional monarchy is that parliament has the supreme power, and the legislative power is higher than the executive power. The representatives of the constitutional monarchy are: the only experiment in the history of the United Kingdom to write a constitution, the "Covenant Law". >>>More

16 answers2024-04-08

Hello, there are two aspects of knowledge to be tested in this physics question: >>>More

11 answers2024-04-08

A tractor ploughs the land per hour = total amount of work work efficiency = 1 6 divided by 1 3= Second question: 1 ( Seek!