How to write a c programming report template

C Programming Report Format

The course design (practice week) report generally has the following contents:

1. Table of Contents

The table of contents is to arrange the chapter headings within the report in order.

2. Requirements analysis

The main content includes the course design (practice week) title, the course design (practice week) tasks and requirements, the course design (practice week) ideas, hardware and software operating environment and development tools.

3. Outline design

Mainly describes the flow chart of the design of the subject (each functional module), the main data structure, the completion of the course design (practice week) methodology and a brief description of the principle.

4. Detailed design

Mainly the hardware design and software design required for this topic, including the establishment of the mathematical model required for the design and list the necessary formulas, calculation process and description, the design and implementation of the main algorithms, write the results of the design calculations; draw a block diagram of the computer program, and write a self-programmed program.

5. debugging and operating instructions

System debugging analysis and operating instructions for use.

6. course design (practice week) summary and experience

The main development process of the subject is summarized and summarized, the subject in the design process encountered technical difficulties and solutions. It should also include the remaining problems of this topic, as well as insights and suggestions for further development. And write the harvest and experience through this course design (practice week).

7. Acknowledgements

In brief, express your gratitude to those who have directly helped you in the process of design research and design report writing

8. References

In order to reflect the scientific basis of the dissertation and the seriousness of the author’s respect for the results of other people’s research, as well as provide readers with the source of the relevant information, the main references involved in the design of this course (practice week) should be listed. week) the main references involved.

9. Appendices

Some materials may be included in the main body of the paper, which may impair the organization and logic of the paper, or hinder the compactness of the paper’s structure and highlighting of the main idea, etc. They can be included as appendices at the end of the text.

Comprehensive design report in c language, urgent!!!! The program is already there, how should the report be written?

Experiment name: function use practice

I. Preparation

1. Experiment purpose:

(1) master the definition of the function;

(2) grasp the meaning and method of the real participant in the form of parameter “value passing”;

(3) Understand the concept of scope of variables, and learn to define and refer to variables correctly in the program.

2. Laboratory apparatus and equipment: PC, Windows, VisualC++.

3. Program flow chart:

(1) Write a function to determine whether a number is “daffodil number”. A “daffodil number” is a

3-digit number whose cubic sum of the digits is equal to the number itself. Calling this number prints out all the “daffodil numbers”.

Function: flower is used to determine if a 3-digit number is a “daffodil number”.

Input: x, a three-digit integer.

Output: 0, x is not a “daffodil number”;

1, x is a “daffodil number”.

Process: shown in Figure 1.

Figure 1 function flower flow chart

The main function flow is shown in Figure 2.

http://blog.sciencenet.cn/u/wellwang

2

Figure 2 “daffodil number” program flow chart of the main function

(2) to write a function to achieve the conversion of decimal integers to binary numbers. The function is implemented in a non-recursive way.

In the main function, enter an integer, call the function to convert the integer to binary, the output binary

number.

Function:D2B, used to convert a decimal integer to a binary number.

Input: d, decimal number;

b, integer array.

Output: integer value, length of binary number.

The flow is shown in Figure 3.

The main function flow is shown in Figure 4.

II. Experimental Procedure

Program 1:

1. Experimental steps:

(1) Create Win32ConsoleApplication project, project name: E5_1;

(2) Create C++SourceFile, file name: E5_1;

http://blog.sciencenet.cn/u/wellwang

3

Figure 3 Flowchart of function D2B

Figure 4 Flowchart of the main function of the program “Convert decimal integer to binary number”

http:// blog.sciencenet.cn/u/wellwang

4

(3) Input source program:

#include<stdio.h>

intflower(intx);

voidmain()

{

inti;

for(i=100;i<1000;i++)

if(flower(i))

printf(“%d\n”,i);

}

intflower(intx)

{

inta,b,c;

a=x/100;

b=(x%100)/10;

c=x%10;

if(x==a*a*a+b*b*b+c*c*c)

return1;

else

return0;

}

(4) Compile, run the program:

No warnings or errors in compilation. Run the program and the program outputs the results.

2. Experimental data:

Program output:

153

370

371

407

Program 2:

1. Experimental steps:

(1) Create Win32ConsoleApplication project. Project name: E5_2;

(2) Create C++SourceFile, file name: E5_2;

(3) Input source program:

#include<stdio.h>

intD2B(intd,intb[]);

voidmain()

{

inti,d,l,b[10];

printf(“Please enter a decimal number:”);

scanf(“%d”,&d);

http://blog.sciencenet.cn/u/ wellwang

5

l=D2B(d,b);

for(i=l-1;i>=0;i–)

printf(“%d”,b[i]);

printf(“\n”);

}

intD2B( intd,intb[])

{

inti=0;

do

{

b[i]=d%2;

d=d/2;

i++;

}while(d!=0);

returni;

}

(4) Compile, run the program:

No warnings or errors in compilation. Run the program and the program outputs the results.

2. Experimental data:

(1) First set of data:

Input: 8

Output: 1000

(2) Second set of data:

Input: 90

Output: 1011010

(3) Third set of data:

Input: 0

Output: 0

(4) The fourth set of data:

Input: -10

Output: -10-10

Three, the experiment is summarized

Program one outputs the correct data.

Program 2 outputs incorrect data when the input is a negative integer (-10), because the negative number may be -1 when modulo 2 in the process of converting it to

binary.

For the negative numbers, you can convert

their absolute values first, and then add a negative sign in front of the binary number when the conversion is completed.

Through this experiment, we have mastered the method of function prototype description, function definition and function call; we have understood the significance of

function real participation in the formal parameter “value transfer”; we have understood the concept of variable scope; we have improved the level of programming and the ability to

hand.

C language programming lab report how to write ah

Just an example, not to be copied.

Experiment content and requirements:

[Experiment content]

1, through this test preliminary development of computer logic problem solving ability. Skillfully grasp the application of assignment statements and if statements; master switch multiple branching statements and if nested statements

2, the basic data types, operators and expressions and other programming basics learned in the early stage of the application of specific program design.

3, further proficiency in input and output functions scanf, printf and getchar use, familiar with math.h in the use of common mathematical functions

4, master the application of the loop statement.

5. Understand the random number generation function.

[Experimental requirements]

In the specified period of time to complete the experiment independently

1, submitted to the experimental report (electronic)

2, submitted to the corresponding source program file (file name EX6_x name.c, such as EX6_1 Peng Jian.c)

3, the requirements of the simple to the complex, followed by the requirements of the previous basis for modification, the first six questions, the first six questions, the first six questions, the first six questions, and the first six questions. Modification, the first six questions, each question are required to retain their respective programs, six questions later, each question are modified on the basis of the previous question, retain the last program can be (such as to do the ninth question, then retain EX6_9 name.c, to do the 11th question, then retain ex6_11 name.c)

Second, the principle of the experiment and the design of the program:

1, the function header of the selection of the rules, while Loop statement, switch (case) statement, conditional expression, ifelse conditional statement, self-incrementing operator, set complex variables, output random operands.

2, variables to have a score variable and level variable, to have a variable to select the number of algorithmic questions and the calculation of the correct or incorrect variable, to have a random output of the two operand variable and their own results by the operation symbols input variable, and finally there is to determine whether to proceed with the variable character. The intermediate results are switch() for the selection operator and switch() for the grade of the score and the self-increment of the wrong pair of questions and the self-increment of the selection operator calculation.

3. The method of analyzing the problem: first consider setting the shaping variables and character variables, considering the need to constantly loop the calculation, choose to use the while statement to loop. In the body of the loop, the previous output prompt operator, and self-select operator, the answer and output random operands to complete. Then use the switch statement to judge the selected operator, and use the variable for self-incrementing operation, and calculate the number of wrong questions to the right questions and the kind of operation symbols selected. At the end of the loop body, an ifelse statement is used to determine whether to continue execution or to jump out of the loop. Finally, according to the results of the self-incrementing calculation and the formula for the calculation of scores, and use switch statement is to think of the development of the grade.

Three, source code

#include<stdio.h>

#include<stdlib.h>

#include<time.h>

voidmain()

{

……….

}

Four, the results of the test and inspiration

Because the input y to continue the loop, so choose to use the while statement. The while statement should be combined with the previous calculation on cue and nested switch statement and use conditional expression to calculate the result is correct or not, and what type of question is calculated. Finally, the switch statement is used to complete the judgment of the score level.

V. Experimental experience:

Describe the difficulties and problems you encountered in programming or compiling and running the program and the solutions.

How to write a C programming course design report? Does anyone have a sample? Thank you!

Lab Report I

Course C Programming Lab Project C Programming Preliminary Grade

Major Class No. Instructor Jin Faxia

Name Serial No. Experiment Date

I [Experiment Purpose]

1. To understand the development environment using VC++6.0;

2. To master on the system how to edit, compile, link and run a C program;

3. To get a preliminary understanding of the characteristics of a C source program by running a simple C program;

Two [Experiment]

[Experiment 1-1] Inputting and Running a Simple and Correct Program

1) Input the following program

include<stdio.h>

voidmain()

{

printf(“Welcome to C programming! \n”);

}

2). Look carefully at the input program on the screen and check for errors.

3). Compile the program, look at the compile output window and check for errors, if there are any errors you need to correct the errors. Without errors you can run the program.

[Experiment 1-2] Design a program to find the area of a rectangle, knowing that the two sides of the rectangle are 3.2 and 1.5.

[Experiment 1-3] Find the sum of 4 and 6 and output it on the display. Then modify the program to input any 2 integers from the keyboard and output the sum of the two.

Three [Experimental Procedure]

Four [Experimental Summary]