Thursday, July 30, 2009

C++ program

#include

int main()
{
float dist, time, speed;

cout<<"enter the distance : ";
cin>>dist;

cout<<"/n";
cout<<"enter the speed : ";
cin>>speed;

cout<<"/n";
time = dist / speed;
cout<<"The time is : ";
//similar to the above cout command, output the variable time, i cannot do it here


return 0;
}

No comments:

Post a Comment