View Code of Problem 3697

import java.util.Scanner;

class main{

	public static void 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++;
			}
		}
	}

}

Double click to view unformatted code.


Back to problem 3697