My math query is (1+5+ 10+15+20+25 =?)
How I use for loop to get the addition result?
My math query is (1+5+ 10+15+20+25 =?)
How I use for loop to get the addition result?
$answer = 1;
for($x=1;$x<6;$x++){
$answer+=5*$x;
}
echo $answer;