"The best way to cheer yourself up is to try to cheer somebody else up." Mark Twain

Tuesday, April 27, 2010

WAP to input acceleration (cm/sec*sec) and time . calculate the final velocity of an object , that is initially static.

#include<iostream.h>
#include<conio.h>



void main()
{
int ac, t, v;


cout<< "Enter acceleration in cm per second square ";
cin >> ac;
cout<< " Enter time to travarse ";
cin >> t;


v = ac * t; 
// formula of final vel = initial vel + acceleration * time (initial vel = 0)


cout << " Final velocity = " << v << " cm / sec*sec ";


getch();
}

No comments:

Post a Comment

C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.
Now Playing: Ballade Pour Adeline

About Me

My photo
I m an IT lecturer of a college. I love social-work. I want to do something beneficial for society before dying , that can promote our society, to some extent.