#include<stdio.h>
#include<conio.h>
void main()
{
int u,a,t;
float v,s;
clrscr();
printf("\nFinding Final velocity and distance travelled by body:");
printf("\nEnter the initial velocity:");
scanf("%d",&u);
printf("\nEnter the acceleration:");
scanf("%d",&a);
printf("\nEnter the time in sec:");
scanf("%d",&t);
v=u+(a*t);
printf("\nFinala velocity is :%f",v);
s=u+(a*t*t);
printf("\nDistance travelled is:%f",s);
getch();
}
/*
Finding Final velocity and distance travelled by body:
Enter the initial velocity:55
Enter the acceleration:56
Enter the time in sec:40
Finala velocity is :2295.000000
Distance travelled is:24119.000000 .
*/
No comments:
Post a Comment