2 C Programming Language | |
---|---|
Where the job requires | link |
My aim in this course is | Use two branch structure |
In particular aspects of the job which helped me achieve goals | PTA of various errors |
references | Link 1 Link |
1.1 topic name
- All output in the 21st century leap year since a year cutoff year. Note: Criterion leap year is the year of the year divisible by 4 but not divisible by 100, or divisible by 400.
1.1.1 Data Processing
- Data are expressed: integer variable n, i, I is the intermediate value, n being the year
- Data processing: and for use if else statements, it is determined that n <2001 || n> 2100, n <2004, i = 2001; i <= n; i ++, i% 4 == 0 && i% 100 = 0!
1.1.2 build test data
Input data | Output Data | Explanation |
---|---|---|
2000 | Invalid year! | Sample |
2048 | 2004~2048 | Leap Year 2004-2048 |
2002 | None | Not a leap year |
1.1.4 PTA submit a list and description
- Some errors: beginning with vs2019 writing, so the compiler no problem, if the first did not add return 0, then pay more before a count variable, for
a loop with the count ++, some errors later changed many times i ++
1.2 Topic
- Statistical grade point average and the number of students passing
No. This question requires the preparation of the program, the students grade point average is calculated, and statistical pass (score of 60 points) a. Title ensure that input and output are in the range of integer
- Data are expressed: shaping function defined n, a, cou, sum, it, count, double aver, aver is the average, count the number of passes
Data processing: sum of the accumulated value, I is the intermediate value, a is the fraction of all, using if-else statement is determined, which nested for statements
1.2.2 Test Data
Input data | Output Data | Explanation |
---|---|---|
5 77 54 92 73 60 | average = 71.2,count = 4 | Sample |
4 88 86 59 58 | average = 72.8,count = 2 | Four scores |
6 56 75 89 97 43 39 | average = 66.5,count = 3 | Six scores |
1.2.3 PTA submit a list and description
- Compile Error: normal operation, forgot the semicolon to write, did not answer the braces after the else,
- Wrong Answer: = output sample in both left and right by a space, I did not add the output, I used double the average number of definitions,
but the output returns an integer type
Peer assessment
The figure is the other students, below is my
- Above: he will be "the year divisible by 4 but not divisible by 100, or divisible by 400" directly for, look at whether divisible, once every two else, relatively long-winded, straightforward ideas
- Below: I will be "the year divisible by 4 but not divisible by 100, or divisible by 400" as a condition of if, for nested inside, relatively simple, the idea is not very clear
3. learning summary
3.1 learning progress bar
Week / Date | This week the time spent | Lines of code | Learned knowledge Introduction |
---|---|---|---|
10/7-10/10 | 9+ | Line 30 + | scanf () statement, if-else statements, square root |
10.16/10.17 | 5 hours | 141 | How to use the for statement |
10.23/10.26 | 5 hours | 141 | How to define a function, use the while statement |
10.30/11.2 | 8 hours | 200+ | How nested if else and for the |
3.2 Cumulative lines of code words and blog
3.3 Summary and perception of learning content
3.3.1 learning content summary
This week mainly learned how nested if else and for medium, and logical operations. Nesting allows us to enter more values,
and these values can be processed, so that we can not enter a value of
3.3.2 Mind Mapping
3.3.3 Learning Experience
- After last week's lesson, I started my self-study, the effect can be, do question the idea there. Yesterday I was looking for my classmates
to help me solve the problem, their approach makes me feel bad software to learn ah, it is necessary to learn arithmetic, but also to learn array. But later
they also come with an array of algorithms and problem-solving, and I think the method we are using is stupid. Long way to go, but treat time as gold.