View Code of Problem 3697

import java.util.Scanner;

public class Acm {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int i = input.nextInt();
		for(int a=0;a<i;a++){
			int s=input.nextInt();
			int d=input.nextInt();
			int y = s;
			for(int q=0;q<d-s+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:3: error: class Acm is public, should be declared in a file named Acm.java
public class Acm {
       ^
1 error
*/

Double click to view unformatted code.


Back to problem 3697