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