countdown timer on my quiz game program

just as the title says I need help putting a timer on my program and some other improvement, I just started learning C++ so I'm still not familiar with some codes. well anyway heres my code:

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int answer,answer2,a,b,c,d;
cout<<"In this quiz you will answer 10 questions.\n";
cout<<"Answer by pressing number.\n\n\n";
cout<<"A.What is the name of company that made Windows?"<<endl;
cout<<"1.Microsoft 2.Mozilla\n";
cout<<"3.Explorer 4.Dell\n";
cin>>answer;
if (answer == 1)
{
a=10;
}
else
{
c=1;
}
cout<<"What is the tallest mountain in the world?"<<endl;
cout<<"1.Mt.Olympia 2.Mt.Everest\n";
cout<<"3.Mt.APO 3.Mt.Pinatubo\n";
cin>>answer2;
if (answer2 == 2)
{
b=10;
}
else
{
d=1;
}
if (c+d == 3)
{
cout<<"Game Over"<<endl;
}
else
{
cout<<"your score is:"<<a+b<<endl;
}
return 0;
}
Thanks for the help.
Where wold the timer be placed, waht would it be used for, and what other improvments..
Topic archived. No new replies allowed.