Design and develop C program for evaluating the equation: v=u+at; s=ut+(1/2)at2 ; v2-u2=2as; (hint: LHS= v2-u2 , RHS=2as) LHS=RHS prove the equation in c program
Answers
Answer:
nice que ask on Google
bye and sorry
Answer:
The equation is proved using C program
Explanation:
Source code in C
#include<stdio.h>
#include<conio.h>
void main( )
{
clrscr( );
float v,u,a,t,s;
prinft("Enter initial velocity:");
scanf("%f",&u);
prinft("Enter final velocity:");
scanf("%f",&v);
printf("Enter acceleration:");
scanf("%f",&a);
printf("Enter time:");
scanf("%f",&t);
printf("Enter distance:");
scanf("%f",&s);
if(v==u+a*t)
{
printf("L.H.S=R.H.S");
}
if(s==u*t+1/2*a*t*t)
{
printf("L.H.S=R.H.S");
}
if(v*v-u*u==2*a*s)
{
printf("L.H.S=R.H.S");
}
getch();
}
Source code in c++:
#include<iostream.h>
#include<conio.h>
void main( )
{
clrscr( );
float v,u,a,t,s;
cout<<"enter initial velocity";
cin>>u;
cout<<"enter final velocity";
cin>>v;
cout<<"enter acceleration";
cin>>a;
cout<<"enter time";
cin>>t;
cout<<"enter distance";
cin>>s;
if(v==u+a*t)
{
cout<<"L.H.S=R.H.S";
}
if(s==u*t+1/2*a*t*t)
{
cout<<"L.H.S=R.H.S";
}
if(v*v-u*u==2*a*s)
{
cout<<"L.H.S=R.H.S";
}
getch();
}