+ 5
Scanner wont work
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scan=new Scanner(System.in); int store=0; System.out.println("This program finds the largest length length of " +"a square.Type a number"); System.out.println("Area of square:"); int areaofsquare=scan.nextInt(); for(int factors=1;factors<=areaofsquare;factors++){ if(factors<= areaofsquare % factors ) store=factors; } don't have space
3 Respuestas
+ 4
run this with 25
https://code.sololearn.com/cgNDK1pnuDEY
+ 4
You should type the full code by skipping some obvious statements.
Because the problem may be after this.
+ 3
The if test is wrong so it isn't ever true. I believe he meant:
if(factors<= areaofsquare / factors ){