I set myself the following additional goal (devised by me):
I decided to write a program to calculate the student's percentage chance of getting an interview in Cambridge University by considering the important factors such as: percentage average of three best A-Level subjects, participation in Olympiands, where it was achieved Gold/Silver/Bronze or nothing, was the interest shown in going to the lectures outside the A-Level program or not and the in addition random chance of being just a bit lucky. My solution was in a file called Caminterview.cc Aspects learned: acquaintance with the synthex loops with if/else and if else printing out things - cout, etc
//Here begins file Caminterview.cc // Cambridge success // usage: // calculation of success // features: // uses cout to write text // for loop // if #include#include using namespace std; int main(int argc,char* argv[]) { int luck1; int luck2; int luck3; int luck4; int luck5; cout<< "What is your percentage in best subject?" < > firstbest; cout<< "What is your percentage in second best subject?"< > secondbest; cout<<"What is your percentage in third best subject?"< > thirdbest; int average; average = (firstbest+secondbest+thirdbest)/3 ; cout<< "Your average is "<< average < = 92 ){ luck1 = 40 ; } else if ( average >= 86 && average<92){ luck1 = 20 ; } else { luck1 = 10; } cout << "your first luck is " < > answer; //cout << answer << endl; if (answer == "yes") { cout<< "How many Olimpiands have you done ?"<< endl; int number; cin >> number; if (number >= 3 ){ luck2 = 10; } else if (number >= 1 && number< 3 ){ luck2 = 5; } else { luck2 = 0; } cout << "your second luck is " < > answer1; if ( answer1 == "yes") { luck3 = 30; } else { luck3 = 0; } cout << "your third luck is " << luck3 << endl; cout<< "Have you been going to additional lectures apart from school of your chosen subject of interest?"<< endl; string answer2; // char answer2[100]; cin >> answer2; if (answer2 == "yes") { luck4 = 5; } else { luck4=0; } cout << "your fourth luck is " << luck4 << endl; } luck5 = 0 + ( std::rand() % ( 20 - 0 + 1 ) ); // calculate the random luck from 0 to 20 % cout << "Cambridge is a strange world. Sometimes you just get lucky. Your fifth RANDOM luck is" <