The velocity of a car at different time instant is given as
Time (0) 10 15 18 22 30
Velocity v(t) 22 26 35 48 68
A linear Lagrange interpolant is found using these data points. Write a C
program to find the velocity of the car at different time instants.
Answers
Answered by
3
Hey Mate Here Is Your Answer..
Answer:
/**************************************
* C program to calculate velocity. *
**************************************/
#include <stdio.h>
void main()
{
int d,t,v;
/*
* get time and distance from user
*/
printf("Enter distance : \n");
scanf("%d", &d);
printf("Enter time: \n");
scanf("%d", &t);
/* velocity calculation */
v = d / t;
/* Print velocity */
printf("velocity = %d",v);
}
Rishi
Similar questions
Computer Science,
2 months ago
Social Sciences,
2 months ago
Geography,
5 months ago
Social Sciences,
5 months ago
Math,
10 months ago
Music,
10 months ago
Biology,
10 months ago