Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(project1.dat) Name ID T1 T2 T3 HW1 HW2 HW3 HW4 PRJ Abdul Rouf b. Ruslan AK02142

ID: 3849286 • Letter: #

Question

(project1.dat)

Name         ID                T1 T2 T3 HW1 HW2 HW3 HW4 PRJ

Abdul Rouf b. Ruslan    AK021425    47 17 50 10 10 10 10 68

Adila Murni bt.Nordin    AK021432    20 41 40 1.5 10 10 10 80

Ahmad Fakhruddeen b. Hashim AK021482    68 45 75 10 10 0 10 70

Ahmad Fitri b. Abu Bakar AK021471    39 23 35 10 10 10 10 75

Ahmad Hanbali b. Abidin    AK021470   42 53 60 4 10 10 10 75

Ahmad Khairil b. Abdul Jabar AK021431    23 50 45 10 10 7.5 10 68

Amirul Hidayat b. Mohd Desa AK021446    30 33 65 10 10 0 10 70

Anas b. Mohd Jaafar    AK021481    57 34 75 0 10 0 10 55

Anuar b. Abdullah     AK021484    25 49 45 10 10 10 10 60

Azrul b. Hj. Hassan    AK021476    52 55 50 6 10 10 10 80

Azlan b. Abu Bakar    AK021416    47 27 45 0 10 5 10 65

Charlie Sia Chin     AK021427    28 64 25 10 10 0 10 75

Debbie Lo      AK021450    22 55 55 10 10 10 10 80

Fatimah bt. Shamsuddin    AK021429    34 42 48 3 10 10 10 80

Fazedy b. Mohd Fauzie    AK021474    53 8 46 10 10 0 10 75

Freddawati bt. Rashiddy Wong AK021456    20 10 45 0 10 10 10 70

Gale M. Ng      AK021466    41 52 60 5 10 10 10 75

Hassan b. Mohd Sulaiman    AK021457    33 26 70 0 10 7.5 0 60

Juliana bt Mohd Tahir    AK021449    26 52 63 2 10 10 10 75

Kainizam Harun      AK021421    31 19 45 0 10 0 0 55

Khairul Azmi b. Hj. Razali AK021477    51 48 45 0 10 10 10 75

Liyana bt. Haminudin    AK021464    34 58 65 3 10 10 10 75

Loke Lai Peng      AK021454    65 25 65 10 10 10 10 70

Marlaini bt. Mohamed    AK021433    44 50 40 2 10 10 10 75

Megat Amzari b. Mohd Aris AK021441    37 52 20 2 10 5 7.5 60

Meria Marsita bt. Mohd Azman AK021418    33 15 75 3 10 10 10 75

Mohamad b. Kader Maidin    AK021460    16 18 25 10 10 10 7.5 55

Mohd Anuar b. Mohd Nor    AK021480    28 15 30 10 10 0 10 60

Mohd Azizul Adli Jahiman AK021485    65 49 75 7 10 7.5 10 80

Mohd Baharuddin b. Yusoff AK021463    34 13 55 0 10 0 10 78

Mohd Fadhli b. Ahmad   AK021424    30 14 40 10 10 0 7.5 55

Mohd Fahmy b. Abdul Samat AK021458    17 6 25 0 10 0 10 78

Mohd Fahrurazi b. Mohd Nor AK021419    5 14 50 10 10 0 10 60

Mohd Fairuz b. Modi    AK021478    35 5 40 6 0 10 10 65

Mohd Fauzan b. Kosnan     AK021448    45 24 45 0 10 0 10 60

Mohd Hanafiah b. Moktar    AK021443    33 32 50 0 10 10 10 80

Mohd Junaidy b. Abdul Jawas AK021412    13 6 35 3 0 7.5 10 60

Mohd Khairul b. Ismail    AK021447    45 15 65 0 10 0 10 60

Mohd Mohazam b. Mohammad AK021479    26 28 25 3 10 7.5 0 55

Mohd Mustaffa Yaacob    AK021473    43 30 20 0 10 0 5 65

Mohd Suffian b. Mat Lazim AK021440    56 39 41 4 10 10 0 80

Mohd Yushairee b. Mohd Yusoff AK021459    38 29 45 10 10 10 10 75

Muhammad Hafiz b. Zan    AK021472    48 47 45 10 10 0 10 75

Muhd Uwais Alqarni b. Mokhtar AK021413    37 8 45 1.5 10 5 10 60

Nor Anisah bt. Senawi    AK021467    28 52 40 3 10 7.5 10 65

Nor Nina Natasha bt. Nor Azizan AK021445    31 43 55 3 10 7.5 10 80

Noraishah bt. Mohamad Noor AK021483    16 65 63 3 10 10 10 70

Norul Hafizza bt. Yahaya AK021437    15 58 55 0 10 10 10 75

Nur Azhani bt. Abdul Razak AK021439    10 60 55 0 10 7.5 10 75

Nur Farahaizan bt. Idris AK021465    33 40 35 3 10 10 10 78

Nurhasliza bt. Rosli    AK021423    36 20 57 3 10 10 10 75

Rahimah bt. Hj. Abdul Hamid AK021462    42 47 40 0 10 10 10 75

Safiah bt. Abdul Razak    AK021468    22 25 45 3 0 10 10 75

Salina b. Sumali    AK021442    40 37 50 0 10 10 10 75

Santha A/P Raman    AK021455    32 21 40 10 0 7.5 10 68

Shah Hazli b. Shahurudin AK021434    71 42 50 10 10 10 10 75

Shahrun Nizam b. Abdul Munir AK021430    28 13 35 10 10 0 10 75

Shaiful Nizam b. Bokhairi AK021426    47 34 45 7 10 10 10 68

Suhana bt. Che Seman    AK021420    36 16 50 3 10 10 10 75

Umi Kalsom b. Ahmad    AK021438    35 42 43 0 10 10 10 80

Wan Asmalinda bt. Wan Aziz AK021415    39 26 85 1.5 10 10 10 75

Wan Aznida bt. Wan Ahmad AK021414    23 42 45 3 10 7.5 10 78

Yong Chiun Huei      AK021453    70 0 0 10 10 0 0 0

Yunus b. Alias      AK021444    50 39 55 10 10 7.5 10 80

Za'aba Helmi b. Khamisan AK021422    26 31 45 9 10 10 10 68

Zamri b. Ahmad Aman    AK021451    34 33 30 3 10 0 10 60

Nasrul Hakim b. Mohd Ramly AK021435    43 34 72 9 10 10 10 75

Muhamad Asri Thomas    AK021461    21 61 30 5 10 7.5 10 75

SKMM 1013 Programming for Engineers a. Summary of results Subject Code Project 1 Semester Number of student Problem Statement You are given a data file (project1.dat) consisting of marks for SME 3533 Overall average mark and grade b. Alphabetically sorted student's final grade in the following format: Component Design course for Sem I 2011/2012 in the following format:

Explanation / Answer

#include <stdio.h>
#include <stdlib.h>
#include<string.h>
struct student
{
   char* name;
   char *ID;
   int T1;
   int T2;
   int T3;
   int HW1;
   int HW2;
   int HW3;
   int HW4;
   int Prj;
   double final;

};
int main()
{
char const* const fName = "inp.txt";
FILE* fil = fopen(fName, "r");
char lin[200];
   student st[100];
   int i=0;
while (fgets(lin, sizeof(lin), fil)) {
char *name=strtok(lin," ");
       char *s=name;
       while(true)
       {
           if(s[0]=='A'&& s[1]=='K'&& s[3]=='0')
               break;
           s=strtok(NULL," ");
           name=strcat(name,s);
       }
       st[i].name=s;
       st[i].T1=atoi(name);
       st[i].T2=atoi(strtok (NULL, " "));
       st[i].T3=atoi(strtok (NULL, " "));
       st[i].HW1=atoi(strtok (NULL, " "));
       st[i].HW2=atoi(strtok (NULL, " "));
       st[i].HW3=atoi(strtok (NULL, " "));
       st[i].HW4=atoi(strtok (NULL, " "));
       st[i].Prj=atoi(strtok (NULL, " "));
       float t1=0.2*st[i].T1;
       float t2=0.2*st[i].T2;
       float t3=0.2*st[i].T3;
       float total=0;
       total=total+t1+t2+t3;
       printf("%f test ",total);
       float avg=(st[i].HW1+st[i].HW2+st[i].HW3+st[i].HW4)/4;
       printf("%f average ",avg);
       avg=0.1*avg;
       total=total+avg;
       printf("%f total 2 ",total);
       total=total+(0.3*st[i].Prj);
       printf("%f Project ",total);
       st[i].final=total;  
       i++;
}
   for(int k=0;k<i;k++)
       printf("%f ", st[k].final);
fclose(fil);
   system("pause");
return 0;
}