How would I represent this for loop in a mathematical equation?
double n = 1;
double x = Math.pow(3, n);
for(double i = 0; i < n; i++){
x = x + Math.pow(3, i);
}
Sorry wrote it in Java in a hurry.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…