Well basically what I'm trying to do is write a program that will prompt the user to enter an integer, then take that number and Square it as well as print it out and continue in this loop until 0 is entered. Here is what I have done and failed to try to do so far, thanks for the help guys.
#import java.util.Scanner;
public class twelve{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int i = in.nextInt;
do {
if (i == 0) System.out.print("0 cannot be used ");
else {
System.out.print(i * i + ",");
}
} while( i != 0);
System.out.print(i*i + ",");
}
}
Problems im really struggling with most is how to get the program to square the number and then at this point im not even sure if this will run back through the loop again. Thanks for the help guys 3rd week of programming ><