The program is as follows...
public class SDD
{
public static void main(String args[])
{
int x=0, y=10;
do{
++x;
y-=x++;
}while(x<=7);
return(y);
}
}
The error is as follows......
Cannot return a value from method whose type is void.