Computer Science, asked by indu5005, 5 months ago

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 rishisourav5
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