Pages

💡 Now You Can Get your Assignments Sollution here... .💡 100% plagiarism Free Service...💡 Responsibility, punctuality and on-time delivery... 💡 Furnishing you with experts... 💡 experienced in your subject 100% privacy... 💡 helping you with the highest efficiency , professionalism Affordable and budget-friendly costs that do not make a hole in your wallet

Kids IQ level test Creater program

Kids IQ level test Creater program




#include<iostream>

#include<windows.h>

#include<fstream>

#include<conio.h>

#include<string>

using namespace std;

int intro(void);

void setcolor(unsigned short color);


int main()

{


int log = 24, no_students = 0, no_tests = 0, no_question = 0, roll_no, *counter = new int[no_students], *position = new int[no_students];

int **marks = new int *[no_students], *level = new int[no_question];

int appericiate, value1 = 0, value = 0, val = 0, answer, orignal_answer, ans_wrong = 3;

char type;

string as = "Bravo!";

string asd = "Terrific!";

string asf = "Fabulous!";

string asg = "Awesome!";

string ash = "Does not matter, keep it up";

string asj = "I like your enthusiasm.";

string ask = "Once you learn to quit, it becomes a habit…. KEEP GOING!";

intro();

system("COLOR 0C");

setcolor(14);

username:

cout << "<><><><><><><><><><><><><><><><><><><><><><><><<><><><><><><><><<><><><><><><><>" << endl;

cout << "<> WELCOME TO UCp KIDS CORNER <>" << endl;

cout << "<><><><><><><><><><><><><><><><><><><><><><><><<><><><><><><><><<><><><><><><><>\n\n\n\n\n";

string user, use = "user";

string password = "qwerty";

string pass;

cout << endl << endl << "\n\n Enter username: ";

cin >> user;

cout << "\n Password: ";

cin >> pass;

if (user == use)

{

if (pass != password)

{

cout << "wrong password wait..." << endl;

Sleep(3000);

system("cls");

goto username;

}

else

{

system("cls");

cout << "Welcome to teacher account" << endl << endl;

menu:

Sleep(2000);

system("cls");

cout << "\n\n\n\n\n\n\n\n\t\t\tplease press '0 for Logout" << endl;

cout << "\t\t\tplease press '1' to check results" << endl;

cout << "\t\t\tplease press '2' to create test " << endl;

cout << "\t\t\tplease press '3' for Student Login" << endl;

cin >> log;

switch (log)

{

case 0:

{

system("cls");

cout << "\n\n\n\n\n\n\t\t\t\t\tyou have loged out" << endl;

break;

}

case 1:

{

system("cls");

////////////////////////////////////////

int rooll, tes;

cout << "enter the student roll no (1-" << no_students + 1 << ") :";

cin >> rooll;

cout << "enter the test no (1-" << no_tests + 1 << ") : ";

cin >> tes;

cout << endl << marks[rooll - 1][tes - 1];

//results add karo////////////////////////////////////////

system("pause");

goto menu;

}

case 2:

{

system("cls");

cout << "\n\n\n\n\t\tNumber of students in class :";

cin >> no_students;

cout << "\n\t\tNumber of tests :";

cin >> no_tests;

cout << "\n\t\tNumber of Questions in test :";

cin >> no_question;

system("pause");


for (int k = 0; k<no_students; k++)

{

position[k] = 0;

level[k] = 0;

marks[k] = 0;

}

goto menu;

}

case 3:

{

system("cls");

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

{

marks[i] = new int[no_tests];

}

//////////////////////student////////////////////////////////////

login:

//cout<<"press '0' if you want to LOGOUT"<<endl;

cout << "\n\n\n\t\tplease enter your roll number(1-" << no_students << ") :";

cin >> roll_no;

if (no_students>0)

{

if (counter[roll_no - 1] != 1)

{

level[roll_no - 1]++;

if (level[roll_no - 1] == no_question)

{

counter[roll_no - 1] = 1;

}

if (roll_no - 1 <= no_students)

{

{

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////test


/////////////////////////

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

level[i] = 0;

///////////////////// /

int count = 0;

choice:

system("cls");

cout << "\n\n\n\t\tplease choose the type or operation :";

cin >> type;


while (position[roll_no - 1]<no_question)

{

char p;

cout << "\n\n\n\t\tpress 'E' to qiut test & any other key to continue" << endl;

cin >> p;

if (p == 'E')

{

cout << "\n\n\n\n\n\n\nRoll#" << roll_no << " at question# " << position[roll_no - 1] << " loged out :]"<<endl;

goto menu;

}

count++;

position[roll_no - 1] += 1;

switch (type)

{

case'+':

{

if (level[roll_no - 1] <= (no_question / 2))

{

level[roll_no - 1] += 1;

value = rand() % 10;

value1 = rand() % 10;

orignal_answer = value + value1;

re_answerepls:



cout << "\n\n\n\n\n\t\t ******************************************" << endl;

cout << "\t\t * \t" << "Q#" << position[roll_no - 1] << "\t" << value << " + " << value1 << " = ?\t *" << endl;

cout << "\t\t ******************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;


if (answer == orignal_answer)

{

randum:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randum;

//Sleep(5000);

marks[roll_no - 1]++;

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randum1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randum1;

//Sleep(7000);

goto re_answerepls;

}

}

// goto usename;

}

else///

{

val = rand() % 100;

value = rand() % 100;

value1 = rand() % 100;

orignal_answer = value + value1 + val;

re_answerepls1:

cout << "\n\n\n\n\n\t\t ************************************************" << endl;

cout << "\t\t *\t\t" << "Q#" << position[roll_no - 1] << "\t" << value << " + " << value1 << " + " << val << " = ? *\n";

cout << "\t\t ************************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;

if (answer == orignal_answer)

{

randumpls1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randumpls1;

//Sleep(7000);

marks[roll_no - 1]++;

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randumplx1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randumplx1;

// Sleep(7000);

// system("cls");

goto re_answerepls1;

}

}

}

//system("cls");

break;

}

case'-':

{

if (level[roll_no - 1] <= (no_question / 2))

{

level[roll_no - 1] += 1;

value = rand() % 10;

value1 = rand() % 10;

orignal_answer = value - value1;

re_answeremin:

cout << "\n\n\n\n\n\t\t ******************************************" << endl;

cout << "\t\t * \t" << "Q#" << position[roll_no - 1] << "\t" << value << " - " << value1 << " = ?\t *" << endl;

cout << "\t\t ******************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;

if (answer == orignal_answer)

{

randummin:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randummin;

marks[roll_no - 1]++;

Sleep(7000);

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randummin1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randummin1;

Sleep(7000);

goto re_answeremin;

}

}

//goto username;

}

else

{

val = rand() % 100;

value = rand() % 100;

value1 = rand() % 100;

orignal_answer = value - value1 - val;

re_answeremin1:

cout << "\n\n\n\n\n\t\t ************************************************" << endl;

cout << "\t\t *\t\t" << "Q#" << position[roll_no - 1] << "\t" << value << " - " << value1 << " - " << val << " = ? *\n";

cout << "\t\t ************************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;

if (answer == orignal_answer)

{

randummin2:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randummin2;

marks[roll_no - 1]++;

Sleep(7000);

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randumminx1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randumminx1;

Sleep(7000);

goto re_answeremin1;


}

}


}

break;

}

/////////////////////////////end of case min

//start of case divide/////////////////////

case'/':

{if (level[roll_no - 1] <= (no_question / 2))

{

level[roll_no - 1] += 1;

value = rand() % 10;

value1 = rand() % 10;

orignal_answer = value / value1;

re_answerediv:

cout << "\n\n\n\n\n\t\t ******************************************" << endl;

cout << "\t\t * \t" << "Q#" << position[roll_no - 1] << "\t" << value << " / " << value1 << " = ?\t *" << endl;

cout << "\t\t ******************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;

if (answer == orignal_answer)

{

randumdi:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randumdi;

marks[roll_no - 1]++;

Sleep(7000);

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randumd1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randumd1;

Sleep(7000);

goto re_answerediv;

}

}

break;

}

else///

{

val = rand() % 100;

value = rand() % 100;

value1 = rand() % 100;

orignal_answer = value / value1 / val;

re_answerediv1:

cout << "\n\n\n\n\n\t\t ************************************************" << endl;

cout << "\t\t *\t\t" << "Q#" << position[roll_no - 1] << "\t" << value << " / " << value1 << " / " << val << " = ? *\n";

cout << "\t\t ************************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;

if (answer == orignal_answer)

{

randumdivv1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randumdivv1;

Sleep(7000);

marks[roll_no - 1]++;

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randumdivx1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randumdivx1;

Sleep(7000);

goto re_answerediv1;

}

}

break;

}

}

////////////////////////////////////end of case divide///

//start of case multiplication///////////////////////////

case'*':

{

if (level[roll_no - 1] <= (no_question / 2))

{

level[roll_no - 1] += 1;

value = rand() % 10;

value1 = rand() % 10;

orignal_answer = value*value1;

re_answeremul:

cout << "\n\n\n\n\n\t\t ******************************************" << endl;

cout << "\t\t * \t" << "Q#" << position[roll_no - 1] << "\t" << value << " * " << value1 << " = ?\t *" << endl;

cout << "\t\t ******************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;

if (answer == orignal_answer)

{

randummul:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randummul;

Sleep(7000);

marks[roll_no - 1]++;

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randummul1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randummul1;

Sleep(7000);

goto re_answeremul;

}

}

break;

}

else///

{

val = rand() % 100;

value = rand() % 100;

value1 = rand() % 100;

orignal_answer = value*value1*val;

re_answeremul1:

cout << "\n\n\n\n\n\t\t ************************************************" << endl;

cout << "\t\t *\t\t" << "Q#" << position[roll_no - 1] << "\t" << value << " * " << value1 << " * " << val << " = ? *\n";

cout << "\t\t ************************************************" << endl;

cout << "\n\n\n\t\t\t\t ANS: ";

cin >> answer;

if (answer == orignal_answer)

{

randummul2:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t\t " << as << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t\t\t\t " << asd << endl;

}

else if (appericiate == 3)

{

cout << "\n\n\t\t\t\t " << asf << endl;

}

else if (appericiate == 4)

{

cout << "\n\n\t\t\t\t " << asg << endl;

}

else if (appericiate == 5)

{

cout << "\n\n\t\t\t " << asj << endl;

}

else

goto randummul2;

Sleep(7000);

marks[roll_no - 1]++;

}

else

{

if (ans_wrong>0)

{

ans_wrong--;

randummulx1:

appericiate = rand() % 10;

if (appericiate == 1)

{

cout << "\n\n\t\t\t" << ash << endl;

}

else if (appericiate == 2)

{

cout << "\n\n\t" << ask << endl;

}

else

goto randummulx1;

Sleep(7000);

goto re_answeremul1;

}

}

break;

}

}

default:

{

cout << "wrong choice :(\n";

goto choice;

}


}

if (no_question == count)

{

system("cls");

cout << "\n\n\n\t\t\tCongrates you complete your test " << no_tests + 1 << endl;

cout << "\n\n\n\n\t\t\t\tRoll# " << roll_no << " signed out\n\n\n" << endl;

goto menu;

}

}//end of while<no_questions/end of while

//////////////////////////////////////////////////////////////////////////////////////////////////////////////end test

}

}


else

{

system("cls");

cout << "Roll number you have enter is not present in this class :]" << endl;

goto login;

}

}

else

{

system("cls");

cout << "you have already done this test" << endl;

goto menu;

}

}

else

{

system("cls");

cout << "Roll number you have enter is not present in this class :]\n or may be test not be genrated" << endl;

goto menu;

}


}//end of student loop


default:

{

cout << "wrong choice" << endl;

}

}/////////end of switch(log)

}

}

else

{

cout << "Wrong Username wait..." << endl;

Sleep(3000);

system("cls");

goto username;

}

system("pause");

return 0;

}

int intro()

{

cout << " __" << endl;

cout << " ,-~¨^ ^¨-, _," << endl;

cout << " / / ;^-._...,¨/" << endl;

cout << " / / / / Regards:" << endl;

cout << " / / / / ucpjunior.blogspot.com" << endl;

cout << " / / / / A helping blog for ucpians" << endl;

cout << " /,.-:''-,_ / / / Tell your friends about ucpjunior" << endl;

cout << " _,.-:--._ ^ ^:-._ __../ because sharing is caring " << endl;

cout << " /^ / /¨:.._¨__.;" << endl;

cout << " / / / ^ /" << endl;

cout << " / / / /" << endl;

system("COLOR 1F");

cout << " / / / /" << endl;

cout << " /_,.--:^-._/ / /" << endl;

cout << " ^ ^¨¨-.___.:^ " << endl;

cout << " microHARD :)" << endl;

cout << " LOADING..." << endl;

cout << " =";

Sleep(500); cout << "="; Sleep(500); cout << "="; Sleep(500); cout << "="; Sleep(500); cout << "=";

Sleep(500); cout << "="; Sleep(500); cout << "="; Sleep(500);

cout << "="; Sleep(500); cout << "=" << endl; Sleep(1000);

system("cls");

return 0;

}

void setcolor(unsigned short color) //The function that you'll use to

{ //set the colour

HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(hcon, color);

}

No comments: