# C++编程设计辅导、辅导program程序

C Programming Final Assignment
Semester: 2022 – 2023 (1)
CourseName: ProgrammingforEngineers(I)
Class:
Name:
Sussex Candidate No.
ZJGSU Number:
C Programming Final Assignment
Instructions
1) Design and write 6 C programs for the problems, and submit 6 C source code
files with the .c extension. Please do not use the .cpp extension, that is, you are
not allowed to use the C++ syntax.
2) Write a report which includes your commented C code, screenshots of test
results for each problem (run your code and show results). You can prepare
your report in a Word file, convert it into a pdf file, and submit the report pdf file.
3) Reminder again: you should submit 6 commented C source code files and 1
report pdf file on Canvas, i.e., a total of 7 files. You can either submit 7 individual
files, or compress the files in a zip file and submit the compressed file.
4) The submission link is Software Exercise XVAC Week 3
https://canvas.sussex.ac.uk/courses/25884/assignments/100788
5) The due time is 1 Jan 2023 by 17:00 (the UK time)
account.
1) You are not allowed to discuss your coursework with other students.
2) Do not copy the code of other students. Do not let other students copy your code.
3) Do not ask other students for their code.
4) Do not show or send your code to other students. Do not allow other students to
wherever necessary to prevent your documents from being stolen. Report to the
police ASAP if your computers and electronic products get stolen.
Problem 1 (15 marks)
Write a C program to calculate the natural number e with:
lim𝑛→∞
(1 +
1
𝑛
)
𝑛
Print the results with five different values of n which are set according to your
Sussex candidate number. If your Sussex candidate number is 123456, then the
values of n are set as 12, 123, 1234, 12345 and 123456. You can use the loop
structure to solve the problem. You are NOT allowed to use the standard
functions, for instance, the pow function.