Good 1.1.4 PTA submit a list and description

(https://img2018.cnblogs.com/blog/1808701/201911/1808701-20191102063946577-893490846.png)

1.1 Tasks cycling and walking 06-01-04

Peking University campus, no bicycle, school work will be very convenient. But in fact, not everything is running a fast ride, because the rider always looking for the car, unlock, parking, lock your car, etc., to delay it some time assuming found bicycle, car and bicycle lock time of 27 seconds; car parking lock time of 23 seconds; pedestrian walking 1.2 meters per second, 3.0 meters per second rider to walk. Please take a different judge distances to work, a fast ride or walk fast.

1.1.1 Data Processing

Using the integer function AB x;

Use the if statement, and nested structures

1.1.4 PTA submit a list and description


At the beginning, not quoted in brackets,
the second time, not to increase the bracket nested structure

1.2 Parity separation

1.2.1 Data Processing

Expression of defined data i, n, x
data for processing using the loop and if-else statements, for used to implement a loop increments from zero to n, it is used to determine if-else the output is even or odd.

1.2.2 Code Screenshot



Data processing: definition of an integer function i, n, x
data Expression: The use of implements for loop increments from 0 to n
if statement is even or odd output
error 1. : Undefined start Parity 0
errors 2. No use is divided by two results

Students Code

[][]
(https://img2018.cnblogs.com/blog/1808701/201911/1808701-20191102182334911-1381630789.png)

(https://img2018.cnblogs.com/blog/1808701/201911/1808701-20191102182306277-1239089306.png)

The students code distance clear, my code is not obvious pitch
students Code winded but easy to understand, especially the definition of variables

Guess you like

Origin www.cnblogs.com/csmzlw53719/p/11780473.html