have i converted this do-while to while correctly
have I converted this do-while loop into a while loop correctly?
i've done basically what my uni notes have stated to do just wondering if it is correct or not.

do-while loop.

    		sum = 0;
		for (count = 1; count <= 10; count ++)
		{
			do
			{
				System.out.println("enter value");
				anInt = c.input,readInt();
			}while (anInt <= 0);
			sum += anInt;
			
		}
		average = sum / 10;
		System.out.println("average =" + average);




and the while loop.

    		sum = 0;
		for (count = 1; count <= 10; count ++)
		{
			System.out.println("enter value");
			anInt = c.input,readInt();
			
			while (anInt <= 0);
			sum += anInt;
			{
				System.out.println("enter value");
				anInt = c.input,readInt();
			}
			
		}
		average = sum / 10;
		System.out.println("average =" + average);
have i converted this do-while to while correctly
===

have I converted this do-while loop into a while loop correctly?
i've done basically what my uni notes have stated to do just wondering if it is correct or not.

do-while loop.

    		sum = 0;
		for (count = 1; count <= 10; count ++)
		{
			do
			{
				System.out.println("enter value");
				anInt = c.input,readInt();
			}while (anInt <= 0);
			sum += anInt;
			
		}
		average = sum / 10;
		System.out.println("average =" + average);




and the while loop.

    		sum = 0;
		for (count = 1; count <= 10; count ++)
		{
			System.out.println("enter value");
			anInt = c.input,readInt();
			
			while (anInt <= 0);
			sum += anInt;
			{
				System.out.println("enter value");
				anInt = c.input,readInt();
			}
			
		}
		average = sum / 10;
		System.out.println("average =" + average);