Answer:
// here is code inn c++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variable
int t;
double acc=32;
cout<<"Enter the time in seconds:";
// read the time in seconds
cin>>t;
// Calculate the distance=acceleration x time-squared divided by 2
double dis=acc*(t*t)/2;
// print the distance
cout<<"distance is: "<<dis<<" feet."<<endl;
return 0;
}
Explanation:
Read the time in seconds from user and assign it to variable "t". declare and initialize variable "acc" with 32.Find the distance as "dis=acc*(t*t)/2". Print the distance.
Output:
Enter the time in seconds:10
distance is: 1600 feet.