#include <stdio.h>
#include <math.h>

int main(void){
	float hrate = 3;
	float vrate = 2;
	
	float hdist;
	float birdHeight;
	float obHeight;

	printf("Please enter the distance between Flappy Bird and the next pipe: ");
	scanf("%f",&hdist);
	printf("Please enter Flappy Bird's height: ");
	scanf("%f",&birdHeight);
	printf("Please enter the distance between Flappy Bird and the next pipe: ");
	scanf("%f",&obHeight);	

	float time = hdist / hrate;
	float vdist = obHeight - birdHeight;
	float flaps = vdist / vrate;
	float betweenFlaps = time / (int)flaps;

	printf("Flappy Bird needs to flap %d times, %.2f seconds apart each time.\n", (int)flaps, betweenFlaps);
	
	return 0;
}
