Learn how to find the value of acceleration in C language. How this Program Work? First, we're taking the value of initial velocity, final velocity and time from the user as input. After that, we'll apply condition if time is positive then calculate the acceleration using formula we defined and print the value of acceleration. And if time is negative then terminate the program because time can't be negative. C Program to Calculate Acceleration #include<stdio.h> void main() { //declaration of variable float v, u, t, acc; /* we're taking v variable for initial velocity, u variable for final velocity t variable for time */ //getting the value of initial velocity from user printf("Enter the Value Of Initial Velocity"); scanf("%f",&v); //getting the value of final velocity from user printf("Enter the Value Of final Velocity"); scanf("%f",&u); //getting the value of tim...
Comments
Post a Comment