 Search:

Submit Article

# Calculate total distance traveled by a vehicle in t seconds is given by DISTANCE = UT + (A * T * T)/2.

Posted By: Debra Nelson     Category: C Programming     Views: 22849

## Code for Calculate total distance traveled by a vehicle in t seconds is given by DISTANCE = UT + (A * T * T)/2. in C Programming

```#include<conio.h>
#include<stdio.h>
void main()
{
float u,a,dist;
int t;
clrscr();

printf(" Enter the value of a : ");
scanf("%f",&a);

printf(" Enter the year of u :- ");
scanf("%f",&u);

printf(" Enter the value of t :- ");
scanf("%d",&t);

dist = (u * t) + (a * t * t)/2;
printf("\n The distance equal to :- %f",dist);

getch();
}
/*    output Enter the value of a : 4 Enter the year of u :- 5 Enter the value of t :- 6 The distance equal to :- 102.000000*/```
Share: Debra Nelson author of Calculate total distance traveled by a vehicle in t seconds is given by DISTANCE = UT + (A * T * T)/2. is from Baltimore, United States. View All Articles

 Please enter your CommentComment should be atleast 30 Characters.Please put code inside [Code] your code [/Code]. No Comment Found, Be the First to post comment!