Eclipse C++编程初学问题 谢谢了

来源:百度知道 编辑:UC知道 时间:2024/06/22 02:34:27
#include <iostream>
using namespace std;

void explaination();
double DecelerationRate;
int CoastingTime;
double CoastingDistance;
int main (){
explaination();
double InitialSpeed;
double FinalSpeed;//FinalSpeed is the speed after 1 minute
double CoastingDistance;
int x,y;//x is the number of minute, y is the number of second
x = CoastingTime/60;
y = (CoastingTime/60)-x;
cout << "Please enter the initial speed in km/h: ";
cin >> InitialSpeed;
cout << "Please enter the speed after 1 minute in km/h: ";
cin >> FinalSpeed;
cout << "The deceleration rate is (in m/s^2): "<< DecelerationRate;
cout << "The coasting time is: " << x <<"Min and "<<y<<" Sec";
cout << "The coasting dis

void explaination()
cout << "This program computes the rate of deceleration of a cyclist based on the speed at two times and then estimates the time until the bike will come to a rest and the distance traveled in that time."
)

这个还是一个函数吗!!!