#include<stdio.h> #include<string.h> int main() { int t; scanf("%d",&t); for(int i=0;i<t;i++) { int k,s; scanf("%d %d",&k,&s); if(k>s) { int temp=s; s=k; k=temp; } for(int j=k;j<=s;j++) { if(j==1) { printf("1 frog has 1 mouth, 2 eyes and 4 legs, jumps into the water with a splash.\n"); } else { printf("%d frogs have %d mouths, %d eyes and %d legs, jump into the water with",j,j,2*j,4*j); for(int k=0;k<j;k++) { printf(" splash"); } printf(".\n"); } } } } |
Double click to view unformatted code.