Test generator

// Example program
#include <iostream>
#include <string>
#include <cmath>
#include <ctime>

using namespace std;

void Skill1()
{
// This function adds a word problem asking the user to find the hypotenuse given two sides.
int a = rand()%100;
int b = rand()%100;
double c;
cout << “Billy is putting a fence daigonally through his garden. His garden is a rectangle “<< a <<” feet wide and ” << b << ” feet long. How long will his diagonal fence be? n n”;
}

void Skill2()
{
cout << “Skill 2 n”;
}

void Skill3()
{
cout << “Skill 3 n”;
}

void Skill4()
{
cout << “Skill 4 n”;
}

int main()
{
srand(time(0));
int userchoice;
do{
cout << “What type of question would you like to add? n”;
cin >> userchoice;
switch(userchoice)
{
case 1: Skill1();
break;
case 2: Skill2();
break;
case 3: Skill3();
break;
case 4: Skill4();
break;
default: cout <<“Goodbye”;
}
}while(userchoice!=0);

Leave a Reply