I figured it out. Thank you so much for this i appreciate all the help and you staying with me throughout my stupidity.
Type: Posts; User: thawigga
I figured it out. Thank you so much for this i appreciate all the help and you staying with me throughout my stupidity.
test program
public class testLoop
{
public static void main(String[] args)
{
for(int j = 1; j<=5;j ++)
{
the answer for when a three is entered is 4 but an 8 was returned
Enter a Value
3
The value is being increased by 2 * 1
The value is 4
Y = 2
Pos = 4
The value is being increased by 2 * ...
Enter a Value
5
The value is being increased by 2 * 1
The value is 4
Y = 2
Pos = 4
The value is being increased by 2 * 2
The value is 8
Y = 3
Pos = 5
for clarification int l is the length, or the location the user wants to find the value of x and y are controlling variables and pos is the current position. val is the value.
import...
I was assigned this problem for java class and i have spent well over ten hours working on this including theory and testing.
so the problem goes like this the value for position 1 is 1, the value...