Program to calculate v^2=u^2=2as
- #include<stdio.h>
- #include<conio.h>
- #include<math.h>
- void main()
- {
- clrscr();
- float v;
- int u,a,s;
- printf("Please enter initial velocity = ");
- scanf("%d",&u);
- printf("Please enter acceleration = ");
- scanf("%d",&a);
- printf("Please enter distance = ");
- scanf("%d",&s);
- v=sqrt((u*u)+(2*a*s));
- printf("Final velocity is %f Km/h.",v);
- getch();
- }
0 Comments