Beruflich Dokumente
Kultur Dokumente
#include<iostream>
#include<string.h>
using namespace std;
struct teacher{
char teacherName[30];
char schoolName[30];
char subjectTaught[2][20];
int yearExperience;
float salary;
};
teacher teachers[3];
int main()
{
bool foundName = false;
char searchName[30]={"VALERIE SOON LAI MENG"};
cout<<"-----------------------------------------------"<<endl;
cout<<"Teachers who teach English & Science subject: \n";
for(int a=0; a<3; a++)
{
if(strcmp(teachers[a].subjectTaught[0], "ENGLISH")==0 ||
strcmp(teachers[a].subjectTaught[1], "ENGLISH")==0
|| strcmp(teachers[a].subjectTaught[0], "SCIENCE")==0 ||
strcmp(teachers[a].subjectTaught[1], "SCIENCE")==0)
cout<<a+1<<". "<<teachers[a].teacherName<<endl;
}
int count10=0;
for(int b=0; b<3; b++){
if(teachers[b].yearExperience>10)
count10++;
}
cout<<"\n\nThe numbers of teachers who has more than 10 years of experience is:
"<<count10<<endl;
#include<iostream>
using namespace std;
struct mpv
{
char manufacturer[30];
float price;
int yearManufactured;
int numOfSeat;
float roadtax;
};
mpv vehicles[3];
int main()
{
getData(vehicles);
findlow(vehicles);
}
#include <iostream>
using namespace std;
int main()
{
insertInput(ratings,row);
leastRating(ratings,row);
findTheBestmovie(ratings,row);
}
}
cout<<"Best movie:" <<indexhigh+1<<" with average rating "<<avgAll[indexhigh]<<endl;
}
OUTPUT: