C language blog work | 06

A teaching goal for this week &

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

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 Learn to use a branched structure, character data types and logical operators
This job helped me achieve that goal in terms of specific More skilled use of C language programming
references primeC

Two .PTA lab assignments

2.1.1 parity separation

1.1.1 Data Processing

数据表达:本题使用整形变量N,i,n,even,odd;
                  N,n是通过赋值得出,i,even,odd通过运算得出
数据处理:本题使用for循环语句和ifelse语句

1.1.2 Screenshot experiment code

1.1.3 build test data

Input data Output Data Explanation
9 88 74 101 26 15 0 34 22 77 3 6 The subject of the data
7 11 13 15 17 19 21 23 0 7 All odd
7 2 4 6 8 10 12 14 7 0 The whole is even

1.1.4 PTA submit a list and description

: 1 Compile Error: play more of a comma
2 Wrong Answer: j = 0 = 0 instead of
3 answers wrong: ditto

1.2 calculate the train running time

1.2.1 Data Processing

 数据表达:首先分别定义h,m,time1,time2均为整型%d,再列出他们之间的关系式,最后输出,注意保留小数位。
 数据处理:先定义,再列出关系式,即hour=arrive/100-depart/100; minute=arrive%100-depart%100,另外还要考虑minute<0的情况,若小于,则minute=60+minute;hour=hour-1,最后输出。

1.2.2 Code Screenshot

1.2.3 build test data

Input data Output Data Explanation
1201 1530 03:29 Given the title
55 55 00:00 hour=minute

1.2.4 PTA submit a list and description

: 1 Compile Error: Multi-hit a brace
2. A non-zero return: 0 after the return accidentally deleted

III. Code peer review

2 parts of the code to find the students, and their own code comparison, the proposed peer review of code to try to find coding style quite different.
Screenshot students Codes
own Code Screenshot

IV. Study summary

4.1 learning progress bar
4.2 cumulative lines of code and blog words
4.3 summarizes the content of learning and perception
4.3.1 learning content summary
4.3.2 Learning Experience

Guess you like

Origin www.cnblogs.com/JiaruiLiu/p/11779468.html