write this using for loop
Attachments:
Answers
Answered by
0
Answer:
int a,b=2,n;
//please specify the value of 'n'
//otherwise it will go wrong
for(a=1;a<=n; a=a+2)
{
b+=a;
++b;
}
System.out.println("b="+b)
Explanation:
Similar questions