# data[].attributes.body
#include<iostream> using namespace std; struct Pelajar{ double ID; string nama; char program; float bmmarkah; float scmarkah; float mmmarkah; float purata; }; Pelajar Pel[10]; int main() { for(int i=0;i<10;i++){ cout<<"masukkan nama pelajar:"; cin>>Pel[i].nama; cout<<"masukkan id pelajar"; cin>>Pel[i].ID; cout<<"masukkan program anda"; cin>>Pel[i].program; cout<<"masukkan markah bm:"; cin>>Pel[i].bmmarkah; cout<<"masukkan markah sc:"; cin>>Pel[i].scmarkah; cout<<"maasukkan markah mm:"; cin>>Pel[i].mmmarkah; Pel[i].purata=(Pel[i].mmmarkah+Pel[i].bmmarkah+Pel[i].scmarkah)/3; cout<<"ID"<<Pel[i].ID; cout<<"nama"<<Pel[i].nama; cout<<Pel[1].program<<Pel[i].bmmarkah<<Pel[i].scmarkah; cout<<"purata"<<Pel[i].purata; return 0; }}

# data[].attributes.body
#include <ionstream>
struct maklumat pelajar
{
double ID;
string nama;
string program;
float MBM,MBM,MSC;
float purata;

}
Pelajar pel[10];
int main;
{
cin>>pel[i].id;
cin>>pel[i].nama;
cin>>pel[i].MBM>>MSM>>MM;

purata= (pel[i].mbm+pel[i].ms)/3

cout<<"masukkan id pelajar"<<pel[i].id;
cout<<"masukan nama pelajar"<<pel[i].nama;
cout<<"masukkan markah pelajar"<<pel[i].mm
Purata pelajar =(pel[i].markahsains+pel[i].markahmatematik+pel[i].markahbm)/3;
cout<<"Purata markah adalah;"
cout<<purata.pel[i]
}

# data[].attributes.body
#include<iostream.h>
struct pelajar{double id;
string nama;
string program;float markah_math;float markah_bm;float markah_sn;float purata;
};
pelajar pel[6];
int main()
{
for(int x=0;x<6;x++)
{
cin>>pel[x].id;
cin>>pel[x].nama;
cin>>pel[x].program;
cin>>pel[x].markah_math;
cin>>pel[x].markah_bm;
cin>>pel[x].markah_sn;

pel[x].purata=(pel[x].markah_math+pel[x].markah_bm+pel[x].markah_sn)/3;

cout<<"ID pelajar:"<<pel[x].id;
cout<<"Nama:"<<pel[x].nama;
cout<<"Program:"<<pel[x].program;
cout<<"markah math:"<<pel[x].markah_math;
cout<<"markah bm:"<<pel[x].markah_bm;
cout<<"markah sn:"<<pel[x].markah_sn;
cout<<"markah purata:"<<pel[x].purata;

}
}

# data[].attributes.body
#include <iostream>
using namespace std;

struct Pelajar{
double IDPelajar;
string NamaPelajar;
string Program;
float MarkahMath,MarkahBM,MarkahSc;
}
Pelajar[10];

int main()
{
for(int i=0;i<10; i++)
cout<<"ID"<<IDPelajar;
cin>> Pelajar[i].IDPelajar;
cout<<"Nama"<<NamaPelajar;
cin>> Pelajar[i].NamaPelajar;
cout<<"Program"<<Program;
cin>>Pelajar[i].Program;
cout<<"Markah Kursus"<<MarkahMath<<MarkahBM<<MarkahSc;
cin>>Pelajar[i].MarkahMath>>MarkahBM>>MarkahSc;

Markah Kursus= (MarkahMath+MarkahBM+MarkahSc)/3;

cout<<"Markah purata anda"<< Markah Kursus;

return 0;
}

# data[].attributes.body
#include<iostream.h >
using namespace std;
Struct pointer
{

double id;

string name;

string program;

float Maths,BM,Science;

float average;

} Pel[12];

int main
{
for (;int i=0;i<12; i++){
cout<<"Enter student id";
cin>>Student[i].id;

cout<<"Enter student name";
cin>>student[i].name;

cout<<"Enter student program";
cin>>Student[i].program;

cout << "Enter marks Math" ; cin >> Student[i].iMath ;

cout << "Enter marks Science"; cin >> Student[i].iSc ;

cout << "Enter marks BM"

cin >> Student[i].iBM ;

Student[i].average= (Student[i].iMath + Student[i].iSc + Student[i].iBM)/3 ;
Student[i].ave = Student[i].total/3;

cout <<"average" <<Student[i].average<< endl;}

return 0; }

# data[].attributes.body
#include <iostream.h>

struct student{
string name;
string pro;
float math,bm,sc;
float purata;
}stu[3];

int main()
{

for(int i=0; i<3;i++)
{
cout<<"Nama\n";
cin>>stu[i].name;
cout<<"ID\n";
cin>>stu[i].pro;
cout<<"Markah Matematik\n";
cin>>stu[i].math;
cout<<"Markah Bahasa Melayu\n";
cin>>stu[i].bm;
cout<<"Markah Sains\n";
cin>>stu[i].sc;

stu[i].purata=(stu[i].math+stu[i].sc+stu[i].bm)/3;
cout<<"Purata\n"<<stu[i].purata<<endl;
}

}

# data[].attributes.body
#include<iostream.h>

struct AC10{
double ID;
string nama;
float math,BM,sains;
float purata;
}p[3];

int main()
{

for(int i=0;i<3;i++)
{
cout<<"\nNama:";
cin>>p[i].nama;
cout<<"ID:";
cin>>p[i].ID;
cout<<"Math:";
cin>>p[i].math;
cout<<"BM:";
cin>>p[i].BM;
cout<<"Sains:";
cin>>p[i].sains;
p[i].purata=(p[i].math+p[i].BM+p[i].sains)/3;
cout<<"Purata markah:"<<p[i].purata<<endl;
}

}

# data[].attributes.body
#include <iostream.h>

struct Pelajar{

double ID;

String nama;

String Program;

float MM, MBM, MSC;

float purata;

};

Pelajar Pel[5];

int main(){

for (int i=0, i<5, i++){
cout<<"masukkan ID:";
cin>>Pel[i].ID;

cout<<"masukkan nama:";
cin>>Pel[i].nama;

cout<<"masukkan program:";
cin>>Pel[i].Program;

cout<<"markah matematik :<<markah Bahasa Melayu :<<markah sains:";
cin>>Pel[i].MM>>Pel.MBM>>Pel.MSC;

Pel[i].purata = (Pel.MM+Pel.MBM+Pel.MSC)/3;

cout<<"Nama:"<<Pel.nama;
cout<<"ID :"<<Pel.ID;
cout<<"Program :"<<Pel.Program;
cout<<"Purata markah :"<<Pel[i].M>Pel[i].MBM>>Pel[i].MSC;}

}

# data[].attributes.body
#include<iostream.h>
#include<string>
struct rekod_pelajar
{
double id;
string name;
float markBM;
float markSN;
float markMT;
float average;
};
rekod_pelajar pel;
pel[40];
int main()
{
for(int i=0;i<=40;i++)

cin>>pel[i].id;
cin>>pel[i].name;
cin>>pel[i].markBM>>pe[i]l.markSN>>pel[i].markMT;
pel[i].average=(pel[i].markBM+pel[i].markSN+pel[i].markMT)/3;
cout<<"ID:"<<pel[i].id;
cout<<"NAME:"<<pel[i].id;
cout<<"MARKAH:"<<pel[i].markBM>>pel[i].markSN>>pel[i].markMT;
cout<<"PURATA:"<<pel[i].average;
}

# data[].attributes.body
// Azman, Supian, Marol

#include <iostream.h>
using namespace std;
{
struct Pelajar
double ID;
string nama;
string program;
float m3,bm,sn;
float purata;
}
Pelajar Pel[4];
int main()

for(int p=0;p>4:p++){

cin>>Pel.id;
cin>>Pel.nama;
cin>>Pel.Program;
cin>>Pel.m3>>Pel.bm>>Pel.sn:

average=(Pel.m3+Pel.BM+Pel.SN)
cout<<"ID"<<Pel.ID<<endl;
cout<<"Program"<

# data[].attributes.body
#include <iostream> using namespace std; struct pelajar { double ID; char Name; float MarkBm; float MarkScience; float MarkMath; float AverageMark;} Stud[10]; int main () {

for (int i=0<10;i++)

{ cin >> Stud[i].ID; cin >> Stud[i].Name; cin >> Stud[i].MarkBm; cin >> Stud[i].MarkScience; cin >> Stud[i].MarkMath; AverageMark= (Stud.MarkBm + Stud.MarkScience + Stud.MarkMath)/3; cout << "ID" << Stud[i].ID; cout << "Name" << Stud[i].Name; cout << "Course Mark" << Stud[i].MarkBm << Stud[i].MarkScience << Stud[i].MarkMath; cout << "Average" << Stud[i].AverageMark; return 0;

}

# data[].attributes.body
#include<iostream>

int main()
struct student{
double ID;
float name;
float MarkMM;
float MarkBM;
float MarkSCN;
float AvMark;

} Pel[10];

int main(){

for (int i=0;i<10; i++){
Student pel;

cin>>Pel[i].ID;

cin>>Pel[i].name;

cin>>Pel[i].MarkMM>>Pel[i].MarkMBM>>Pel[i].MarkMSCN;

purata = (Pel[i].MarkMM+Pel[i].MarkBM+Pel[i].MarkSCN)/3;

cout<<"Your ID"<<Pel[i].ID;

cout<<"Your Name is:"<<Pel[i].name;

cout<<"Markah Kursus "<<Pel[i].MarkMM<<Pel[i].MarkBM<<Pel[i].MarkSCN;

cout<<"Purata"<<Pel[i].AvMark;

return 0;

}

# data[].attributes.body
// Haziq Bin Mohd Husaimi
// D20142069420
#include <iostream>
using namespace std;

struct student{double Stud_Id; string Stud_Name;
string Stud_Prog;
float Math, BM, Sains;
float Purata_Mark;

};

student Pel[5];

int main(){

//Baca Data
for(int x=0; x=5; x++){
cin>>Pel[i].Stud_Id;
cin>>Pel[i].Stud_Name;
cin>>Pel[i].Stud_Prog;
cin>>Pel[i].Math;
cin>>Pel[i].BM;
cin>>Pel[i].Sains;

Pel.Purata_Mark=(Pel.Math+Pel.BM+Pel.Sains)/3;

cout<<"Your Student ID is"<<Pel.Stud_Id<<endl;
cout<<"Your Name Is"<<Pel.Stud_Name<<endl;
cout<<"Your Program is"<<Pel.Stud_Prog<<endl;
cout<<"Your Mark is"<<Pel.Math <<endl << Pel.BM <<endl << Pel.Sains<<endl;
cout<<"Your Average Mark is"<<Pel.Purata_Mark<<endl;

}
}

# data[].attributes.body
#include<iostream.h>
using namespace std;

struct pelajar{

double dID;
char cNama;
float mBM;
float nSAINS;
float pMATEMATIK;
float purata;
}pel[10];

int main(){

for(int i=0;i<=10;i++)
{
cin>>pel[i].dID;
cin>>pel[i].cNama;

cin>>pel[i].dID;
cin>>pel[i].cNama;
cin>>pel[i].mBM;
cin>>pel[i].nSAINS;
cin>>pel[i].pMATEMATIK;

pel[i].purata=(pel[i].mBM+pel[i].nSAINS+pel[i].pMATEMATIK)/3;

cout<<"ID:"<<pel[i].dID;
cout<<"NAMA:"<<pel[i].cNama;
cout<<"MARKAH BM:"<<pel[i].mBM;
cout<<"MARKAH SAINS:"<<pel[i].nSAINS;
cout<<"MARKAH MATEMATIK:"<<pel[i].pMATEMATIK;
cout<<"PURATA MARKAH:"<<pel[i].purata;
}

return 0;
}

# data[].attributes.body
#include<iostream.h>
voidmain();

struct rekodPelajar
{
string id;
string nama;
string program;
float M3;SC;BM;
float purata;
};

pelajar[10];
int main()
{
for(int i=0;i<5;i++);

cin>>pelajar[i].id;
cin>>pelajar[i].nama;
cin>>pelajar[i].program;
cin>>pelajar[i].M3;
cin>>pelajar[i].SN;
cin>>pelajar[i].BM;

pelajar[i].purata:(markah M3+ markah SN+ markah BM)/3

cout<<ID:<<pelajar[i].id;
cout<<NAMA:<<pelajar[i].nama;
cout<<PROGRAM:<<pelajar[i].program;
cout<<MARKAH M3:<<pelajar[i].M3;
cout<<MARKAH SN:<<pelajar[i].SN;
cout<<MARKAH BM:<<pelajar[i].BM;
cout<<PURATA:<<pelajar[i].purata<<endl

}

return(0);

# data[].attributes.headline
NURNADIRAH OTHMAN , NUR KHAIRI SHARMIELA , NURADILAH SAKIRANI.

# data[].attributes.subject
NURNADIRAH OTHMAN , NUR KHAIRI SHARMIELA , NURADILAH SAKIRANI.

# data[].attributes.body
#incude<iostream.h>

void main()

struct NamaPelajar {

float Id[6];

char nama;

char khusus;

float markahBM ,markahSC , markahMT;

float purata;

float puratamarkah;

}

NamaPelajar Pel1 [10];

int main()

{

for(int i= 0 ; i<10 ; i++)

{

cout<<"Masukkan Id anda:";

cin>>Pel1[i].Id;

cout<<"Masukkan nama anda:";

cin>>Pel1[i].nama;

cout<<"Masukkan khusus anda:";

cin>>Pel1[i].khusus;

cout<<"Masukkan markahBM:";

cin>>Pel1[i].markahBM;

cout<<"Masukkan markahSC:";

cin>>Pel1[i].markahSC;

cout<<"Masukkan markahMT:";

cin>>Pel1[i].markahMT;

Pel1[i].purata = (Pel1[i].markahBM +  Pel1[i].markahSC + Pel1[i].markahMT)/ 3;

cout<<"purata markah anda adalah:";

cout<<Pel1[i].puratamarkah;

return 0;

}

# data[].attributes.body
#include <iostream.h>

struct Pelajar{
double id;
string nama;
string program;
float math,bm,sc;
float average;
}pel[10];

int main()
{

for(i=0;i<10;i++){
cout<<"id\n";
cin>>pel[i].id;
cout<<"nama\n";
cin>>pel[i].nama;
cout<<"program\n";
cin>>pel[i].program;
cout<<"math\n";
cin>>pel[i].math;
cout<<"bm\n";
cin>>pel[i].bm;
cout<<"sc\n";
cin>>pel[i].sc;

//kira data
pel[i].average=(pel1.math+pel1.bm+pel1.sc)/3;

//papar

cout<<"name: "<<pel[i].nama;
cout<<"\nID: "<<pel[i].id;
cout<<"\nProgramme:"<<pel[i].program;
cout<<"\nAverage Mark: "<<pel[i].average;
}

}

# data[].attributes.body
#include <string>
struct maklumatPelajar
{
double id;
string nama;
sring program;
float MBM,MSN,MM;
float purata;
}pel[10];

int main

{

for(int i=0;i<10;i++)

cin>>pel[i].id;

cin>>pel[i].nama;

cin>>pel[i].program;

cin>>pel[i].MBM>>pel[i].MSM>>pel[i].MM;

pel.purata=(pel.MBM+pel.MSM+pel.MM)/3

cout<<"masukkan id pelajar"<<pel[i].id;
cout<<"masukkan nama pelajar"<<pel[i].nama;

cout<<"masukkan program"<<pel[i].program;

cout<<"masukkan markah pelajar"<<pel[i].MBM<<pel[i].MSN<<pel[i].MM;
cout<<"purata pelajar"<<pel[i].purata;
}

# data[].attributes.body
struct Student{char name;

double ID;

Char Program;

float BM, Math, Science;

double Average_Mark;

} ;

Student Data;

int main () {
{
for (int i=0;i<10;i++)

{
cin>>Data[i].name;

cin>>Data[i].ID;

cin>>Data[i].Program;

cin>>Data[i].BM>> Data[i].Math >> Data[i].Science;

Data[i].Average_Mark= (Data[I].BM + Data[I].Math + Data[I].Science) / 3;

cout<<"Name"<<Data.name;

cout<<"ID"<<Data.ID;

cout<<"Program"<<Data.Program;

cout<<"Course Mark : "<< Data[I].BM<< Data[I].Math << Data[I].Science;

cout<< "Average"<<Data[I.Average_Mark;

}

# data[].attributes.body
struct Student{char name;

double ID;

Char Program;

float BM, Math, Science;

double Average_Mark;

} ;

Student Data;

int main () {

cin>>Data.name;

cin>>Data.ID;

cin>>Data.Program;

cin>>Data.BM>> Data.Math >> Data.Science;

Average_Mark= (Data.BM + Data.Math + Data.Science) / 3;

cout<<"Name"<<Data.name;

cout<<"ID"<<Data.ID;

cout<<"Program"<<Data.Program;

cout<<"Course Mark : "<< Data.BM<< Data.Math << Data.Science;

cout<< "Average"<<Data.Average_Mark;

}

# data[].attributes.body
#include <iostream>

using namespace std;

struct Pelajar {

double dID;

char cName;

float fSciencemarks;

float fMathmarks;

float fMalaymarks;

float fAveragemarks;

}Student [10];

Pelajar student;

int main

{

for(int i = 0;i<10;i++)

{

cout<<" Insert your student ID: ";

cin>>student[i].ID;

cout<<"Insert your name?: ";

cin>>student[i].Name;

cout<<"Insert your science marks: ";

cin<<student[i].Sciencemarks;

cout<<"Insert your math marks: ";

cin<<student[i].Mathmarks;

cout<<"Insert your Malay marks: ";

cin<<student[i].Malaysmarks;

student[i].Averagemarks=(student[i].Sciencemarks+student[i].Mathmarks+student[i].Malaymarks) /3;

cout<<"Your average marks is :"

cout<<student[i].Averagemarks;

return 0; }

}

# data[].attributes.body
1. Baca lima pelajar - tatasusunan

2. proses purata markah

3. papar maklumat semua pelajar

# data[].attributes.body
#include<iostream.h> using namespace std; struct student{ char name; double id; char program; float bmMark; float scMark; float mtMark; float averageMark; }stud[10]; int main() { for(int i=0;i<10;i++) cout<<"enter your name: "; cin>>stud[i].name; cout<<"enter your id: "; cin>>stud[i].id; cout<<"Your program:"; cin>>stud[i].program; cout<<"enter your bm's mark: "; cin>>stud[i].bmMark; cout<<"enter your sc's mark: "; cin>>stud[i].scMark; cout<<"enter your mt's mark: "; cin>>stud[i].mtMark; averageMark=(stud[i].bmMark+stud[i].scMark+stud[i].mtMark)/3; cout<<"NAME:"<<stud[i].name; cout<<"ID:"<<stud[i].id; cout<<"YOUR PROGRAM:"<<stud[i].program; cout<<"YOUR MARK:"<<stud[i].bmMark<<stud[i].scMark<<stud[i].mtMark; cout<<"YOUR MARK AVERAGE:"<<stud[i]averageMark; }

# data[].attributes.body
#include<iostream.h >
using namespace std;
Struct pointer
{

double id;

string name;

string program;

float Maths,BM,Sci;

float average;

}
Student[10];

int main
{
for (;int i=0;i<10; i++){
cout<<"Enter student id";
cin>>Student[i].id;

cout<<"Enter student name";
cin>>student[i].name;

cout<<"Enter student program";
cin>>Student[i].program;

cout << "Enter marks Math" ; cin >> Student[i].iMath ;

cout << "Enter marks Sci"; cin >> Student[i].iSc ;

cout << "Enter marks BM"

cin >> Student[i].iBM ;

Student[i].average= (Student[i].iMath + Student[i].iSc + Student[i].iBM)/3 ;
Student[i].ave = Student[i].total/3;

cout <<"ave" <<Student[i].ave<< endl;}

return 0; }