/*Newly added tags for bing*/ Unipune Codes: Accept initial velocity, acceleration and time. Print the Final velocity and Displacement.

Pages

Tuesday, 6 October 2020

Accept initial velocity, acceleration and time. Print the Final velocity and Displacement.


 
 
       
/*
Accept initial velocity, acceleration and time. 
Print the Final velocity and Displacement.
*/

#include<stdio.h>
main()

{
    int u,a,t;
    float v,s;

    printf("Enter u, a, t - ");
    scanf("%d%d%d",&u,&a,&t);

    v=u+(a*t);

    printf("Velocity = %f",v);

    s=(u*t)+(0.5*a*t*t);

    printf(" Acceleration=%f",s);
}




No comments:

Post a Comment