answersLogoWhite

0


Best Answer

#include <stdio.h>

#include <math.h>

void main()

{

int tim_intrval, counter,time;

float accl, distance=0, velos;

clrscr();

printf("PROGRAM FOR CALC TOTAL DISTANCE TRAVELED BY A VECHIAL");

printf("\nNO OF TIME INTERVALS : ");

scanf("%d",&tim_intrval);

for(counter = 1; counter <= tim_intrval; counter++)

{

printf("\nAT T%d TIME(sec) : ",counter);

scanf("%d",&time);

printf("\tVELOCITY AT %d sec (m/sec) : ",time);

scanf("%f",&velos);

printf("\tACCLERATION AT %d sec (m/sec^2): ",time);

scanf("%f",&accl);

distance += (velos*time + (accl*pow(time,2))/2);

}

printf("\nTOTAL DISTANCE TRAVELLED BY VEHICLE IN %d INTERVALS OF TIME : %f",tim_intrval,distance);

getch();

}

User Avatar

Wiki User

โˆ™ 11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write c program to find the distance traveled at regular intervals of time?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What can you buy to make you stronger?

Normal foods at regular intervals together with a planned exercise program will do the trick.


Why was it important to fill the box with water at regular intervals?

because it is important to fill a box with water at regular intervals


Is the pulse at regular intervals?

yup


What is a set of intersecting line that appear at regular intervals?

Lines that intersect at regular intervals are a grid. A grid is created when a row and a column intersect.


Is the pulse rate at regular intervals?

Yes


What is periodic fasting?

Fasting at regular intervals.


What kind of computer application is a job scheduler?

A job scheduler is a computer program used for controlling background program execution. It is used for programs that that need to run at regular intervals without the need for human intervention.


How much does an รผber cost?

The cost of Uber depends on the distance traveled, the type of auto you hire (compact, regular, luxury, etc.), and the city where you use it.


Money paid by contract at regular intervals?

annuity


What is the meaning of recurring audit?

Aduting after regular intervals


How do you prevent rust on ships?

by painting them at regular intervals


What is a set of lines that appear at regular intervals?

grid