当前位置:网站首页>C language I blog assignment 03

C language I blog assignment 03

2020-11-08 10:33:00 The world seems to be

Which course does this assignment belong to < Links to classes >
Where are the requirements for this assignment < Links to job requirements >
The goal of this assignment < What do you understand about the assignment objectives >
Student number < Your student number >

1.PTA Experiment assignment
Title Description : Programming , Calculation sequence 1 - 1/4 + 1/7 - 1/10 + ... Before N Sum of items .
1 Screenshot of experimental code

1.1.2 Data division
Data expression : Define variables with denominator,flag,i,n. use int Definition . The data type is the double precision floating-point type of the basic type double
Data processing data : It was used for loop , Formula is item=flag*0.1/denominator;sum=sum+item;d=d+3.

explain :1: Three decimal places are sum=%.3f
2 There's something wrong with some of the spaces and symbols
1.2.2 Data processing :
Data expression : Definition i,n,, floating-point sum,a,b;
Data processing data : It was used for loop


explain : At the beginning of writing this topic , I don't know the train of thought , Later, I asked my classmates , In the end, we get the right result , After finishing the problem , I understand that we should learn from the best people .
1.3 7-4 Before the square root sequence N Xiang He (15 branch )
Calculate the sequence of square roots √1+√2+√3+⋯ Before N Sum of items
1.3.1 Screenshot of experimental code

Data expression : Definition n,s,item,i
Data processing data : Use of the for loop .

explain : There have been several compilation errors , Format error , After repeated verification , Get the right answer , Understand, practice compiling code .
2. Reading the code (-5——5 branch )
Find a good code , Understand code functions , And tell us what you can learn from the code you have chosen . Reference website :
ACM Problem solving
leecode Interview several questions website , Find a simple topic to read and analyze .
Be careful : This part of the answer is too general to be reversed 5 branch .

Topic type : Find the greatest common factor and the least common multiple .
The learning :1. It was used while loop , Learn to divide for Outside the new cycle
2. I've learned to clear my mind , Compile code faster and better .
3. Learning summary (15 branch )
3.1 Learning progress bar (5 branch )

3.3 Learn to understand (5 branch )
Please review your learning process this week , If you have new ideas or new ways , Please make a note in time .
Before you know it, it's the third week , This week, the teacher taught us more code compilation skills , such as for loop , How to find the interleaved sequence n Xiang He .
The homework assigned by the teacher this week is also very complicated , You have to use 5,6 Hours or more to finish it , I understand that this is one of our
test , Not only can we quickly understand the relevant knowledge , And it can stimulate our interest in typing code . I believe these problems can make us enjoy solving them
The joy of , Let's be stronger .

版权声明
本文为[The world seems to be]所创,转载请带上原文链接,感谢