C language | blog Assignment 6

A week teaching content & goals

Chapter 3 students familiar 3.1-3.2 branched structure multibranched structure, character data types and logical operators.

Second, this week the head job

problem answer
This work belongs to the curriculum C Programming Language II
Where the job requires https://edu.cnblogs.com/campus/zswxy/CST2019-2/homework/9886
My aim in this course is Familiar function of if-else
This job helped me achieve that goal in terms of specific Through a series of questions, a very clear understanding of the use of if-else
references C language programming, Baidu

Third, the work week

1.PTA lab assignments

1.1 entrance shortly after the end of each school take into scores came out, Beijing University (Peking University) 720, Zhejiang University (Zhejiang University) 650, University (University Of Technology) 600, ARTS (Shaoxing University) 550, ARTS yuan Pei College (Shaoxing University Yuanpei College) 500, Shaoxing Vocational and technical College (Shaoxing Vocational & technical College) 400, John's score is n, may I ask what college to go to Joe Smith? If the score is below 400, the home farming (to be a farmer). Many students want to know which school to go to, ask them to help you as a programmer.

1.1.1 Data Processing

Data are expressed: the use of the integer variable n, input by the user.
Data processing: if-else uses a branch structure.

1.1.2 Screenshot experiment code

1.1.3 build test data

n result
740 Beijing University
660 Zhejiang University
560 Humanities and sciences institute

1.1.4PTA submit a list and description


Compile error: the use of the ruturn 0 this statement, and did not play the last braces, find and correct after inspection.
Partially correct: there is no express answer in English, resulting in an error.

1.2 at the 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 and so on, which should delay Some time hypotheses to find the bicycle, car and bicycle lock time of 27 seconds; car parking lock time of 23 seconds; walking foot per second, 1.2 meters, 3.0 meters per second rider to walk. Please take a different judge distances to work, a fast ride or walk fast.

1.2.1 Data Processing

Data are expressed: the use of the integer variable n, float variable T1, T2; T1 is a cycling time, T2 is walking with Time, n-distance representatives.
Data processing: T1 = 27 + 23 + ( n / 3.0); T2 = n / 1.2;

1.2.2 Code Screenshot

1.2.3 build test data

n result
10 Walk
15 Walk
26 Walk

1.2.4PTA submit a list and description

[] ( Https://img2018.cnblogs.com/blog/1806906/201911/1806906-20191102013433218-1052091708.png )
wrong answer: because if the order of the statements engage in counter, causes a program error, and later will be replaced on the line before and after .
Compile Error: mistakenly thought would be 0 n divided by 3.0, as an integer divided by an integer equal to 0, after seeing error correction.

2. Code peer assessment

Students Code

Own Code


1. He and I are not the same as the definition of variables, but the same effect
2. I will first define the variables, he takes up multiple lines, looks simple.

Students Code

Own Code


1. The code defines a variable name of the students are not the same, the corresponding English name I use

3. learning summary

3.1 learning progress bar

Week / Date This week the time spent Lines of code Learned Introduction Currently more confusing issues
10/28-11/3 10 hours 100 Role of logical operators, the input and output character data Use of logical operators

3.2 Cumulative lines of code words and blog

3.3 Summary and perception of learning content

3.3.1 learning content summary

3.3.2 Learning Experience

By his own after serious to think well write code that will not go to review, well review the knowledge learned, or rely on their own efforts.

Guess you like

Origin www.cnblogs.com/wrp666/p/11776081.html