j

Monday, 2 November 2015

Write a program that take a, t and v from user and calculate the following fomula res=vt+0.5at^2



#include<iostream.h>
#include<conio.h>
void mian()
{
clrscr();
int v,t,a;
float res;
cout<<"Enter the values of a, t and v ::";
cin>>a>>t>>v;
res=(v*t)+(0.5*a*t*t);
cout<<"The result is "<<res;
getch();
}

Subscribe to this Blog via Email :