import java.util.Scanner; public class Acm { main(String[] args) { Scanner input = new Scanner(System.in); int i = input.nextInt(); int []p=new int[2*i]; for(int a=1;a<=i;a++){ p[2*a-2]=input.nextInt(); p[2*a-1]=input.nextInt(); } for(int t=1;t<=i;t++){ int y = p[2*t-2]; for(int q=1;q<=p[2*t-1]-p[2*t-2]+1;q++){ System.out.println(y+"frogs have"+y+"mouths,"+2*y+"eyes and"+4*y+"legs, jump into the water with splash splash."); y++; } } } } /* Main.java:7: error: invalid method declaration; return type required main(String[] args) { ^ 1 error */ |
Double click to view unformatted code.