C language blog park job 04

A week teaching content & goals

Chapter 2 in C programming language - the output of the cyclic structure F 2.4 - Celsius conversion table. It requires students to master cycling program designed to be used for loop to achieve a specified number of times.

Second, this week the head job

This work belongs to the curriculum C Programming Language II
Where the job requires https://edu.cnblogs.com/campus/zswxy/SE2019-3/homework/9775
My aim in this course is Skilled use of a cyclic structure
This job helped me achieve that goal in terms of specific Summary after practice 1.pta job 2. Job completed
references https://edu.cnblogs.com/campus/zswxy/SE2019-3/homework/9775

1.PTA lab assignments (20 points / questions)

From the PTA elected two focus topics you are most satisfied with the completion of the following topics, select the greater difficulty of the subject, the higher the score, each question 20 points (5 points each), content requirements are as follows:

1.1 questions require programming, calculates sequence - 1/4 + 1/7 - 1/10 + ... and the first N.

1.1.1 Data Processing

数据表达:运用了item sum denominator flag i n 6个变量用item来表示运算,sum作为输出结果, 
数据处理:使用了赋值语句 for循环语句

1.1.2 Screenshot experiment code

1.1.3 build test data

Input data Output Data Explanation
10 sum = 0.819 Consistent with the facts
100 sum = 0.843 Consistent with the facts
50 sum = 0.832 Consistent with the facts
-5 Invalid Value! Less than 0

1.1.4 PTA submit a list and description

1. Compile Error: You entered () in three scanf% d think that there is need to enter a three-digit character

2. Format Error; if used in a for loop statement - else cause the output to match a title 1

7-4 1.2 squared reciprocal portion and a sequence (15 minutes)

This problem requires two positive integers m and n- ( mn- ) programming, and calculates the sequence m 2. 1 + / m + ( m + 1'd). 1 + 2 / ( m + 1'd) + ⋯ + n- 2 +. 1 / the n- .

1.2.1 Data Processing

数据表达:运用m ,n两个存数变量
数据处理:使用#include<math.h>一个新的数据库 和简单的赋值语句和输入语句

1.2.2 Code Screenshot

1.2.3 build test data

Input data Output Data Explanation
5 ,10 sum = 355.845635 Consistent with the meaning of problems

Guess you like

Origin www.cnblogs.com/changshagaoqiao/p/11700785.html