A building has 10 floors with a floor height of 3 meters each. A ball is dropped 

from the top of the building. Find the time taken by the ball to reach each floor. 

(Use the formula s = ut+(1/2)at^2 where u and a are the initial velocity in m/sec (= 

0) and acceleration in m/sec^2 (= 9.8 m/s^2)).

program:

#include<stdio.h>

#include<conio.h>

#include<math.h>

void main()

{

int floor=10,h=3,u=0,s=0;

float a=9.8,t=0,temp,d;

clrscr();

s=floor*h;

d=u*t;

temp=(2*s-d)/a;

t=sqrt(temp);

printf("\n time taken to reach ground %f  sec",t);

getch();

}


output: