Gustavo has 1.40 meters and grows G centimeters per year, while Juliano has 1.10 and grows by centimeters per year.
My program is giving an infinite loop when I execute.
#include<stdio.h>
int main()
{
float g,j,gus=1.40,jul=1.10;
int cont=0;
scanf("%lf %lf",&g, &j);
while(jul<=gus)
{
jul=jul+j;
printf("%lf\n",jul);
gus=gus+g;
printf("%lf\n",gus);
cont++;
}
printf("%d",cont);
}