الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

c programming project

مغلق
بدأه ASBAHIYA في 24 ديسمبر 2003 · 1 رد · 561 مشاهدة · في الأسئلة المجابة
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

marhaba

for every one have any idia about the processing program like this can give me his openin, i now how to do the parts alon . but how to make all the program this the problem.

the program c is :

Please write a program processing data being read from two different text files. one file ,called e.g. student.dat should include all student informantionö like student number,name and surname of the student. Furthermore all the grades of this semester should be included in order to calculate the average of each tudentç The second file includes the grading scheme.(see below)

the layout of these files should be the following:

student.dat

---------------------------------------------------------------------------------------------------

1st line

number of students> <number of exams> weight of Exam1 .. weight of Exam n>#

:2nd line

Student numbeer first name surname Grade of Exm 1....Grade of Exam n

---------------------------------------------------------------------------------------------------

Grade.dat

---------------------------------------------------------------------------------------------------- A 100 85

A- 85 80

B+ 80 75

B 75 70

......

----------------------------------------------------------------------------------------------------

1- you have to read in the files and parse them correctly and store the elements in arrays

2- Calculate the average grade of each student and assign a grade letter according to grade.dat to the student.

3- the program should give the opportunity to sort the table according to student number,name,surname,average and letter grade.

4- one should be able to save the arrays to afile

5- There should be a quit button in the program to leave the program.

#2

I think your program is pretty easy, and thats how it should be done. here are the steps that I would use to solve this program:

(1) open the "student.dat" file

(2) read line by line and save in array (malloc enough size)

(3) for each saved line use "strtok" to tokenizing the string and save the tokens in an array (you can use array of array)

(4) so the calculation and save the results

(5) read the "grades.dat" file and set the parametrs

(6) do the comparision and store data to distination file

(7) quit

Mutix.up

هذا الموضوع مغلق.

مواضيع مشابهة