Also sin/cos/tan are functions so you can't name variables that or it will more than likely have naming conflicts. Also even if you did declare theta before the for loop it would be an endless loop because you never increment it.
Once again if we had a formula or what exactly you are trying to do we could be of more help.
I am attempting write a program that uses a for loop to compute and output Sin(0), Cos(0), Tan(0) for 21 values of 0(theta) equally spaced between 0 and 2Pi.
double theta;
constdouble max = 6.28318; //estimate of 2pi
constint iterations = 20; //we must iterate 20 times
// after the initial 0 for a total of 21
constdouble threshold = 0.0000001; //threshold for comparing doubles
for( theta = 0.0; theta < max + threshold; theta += max / iterations )
{
std::cout << "Cos(" << theta << ") = " << cos( theta ) << std::endl;
//repeat for sin and tan.
}