java programs for the above questions using do while loop
somebody pls help me
Attachments:
![](https://hi-static.z-dn.net/files/dfe/1c6f22574d9f9e3072b61bbbdd0cc113.jpg)
Answers
Answered by
1
Answer: I can help you with this.
1.
String operation='"minus";
Int N=100;
Int total=0;
For(int I =1; I<=N;I++)
{
switch(operation)
{
Case minus:
Total=total - I;
Operation="plus";
Break;
Case plus:
Total=total+ I;
Operation="minus";
Break;
}
System.println(total);
}
Similar questions