Code a C program to calculate and distance covered by a car using pointer when time, velocity and acceleration is given. Function Distance () must take time, speed, and acceleration as parameters and return distance.
The C program must also take input from the user.
1
Expert's answer
2021-12-02T00:35:18-0500
#include <stdio.h>
int distance(int time1, int speed, int acceleration){
return (time1*speed*acceleration);
}
int main()
{
int t=2;
int s=50;
int a=20;
printf("Distance = %d",distance(t,s,a));
return 0;
}
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment