Hey guys so i'm trying to figure out why my code is returning all 0's for distance 'd'? I ran through the 'step over' tool and it seems like it's not even entering my function? It just outputs 0 for everything. Thanks guys
#include "stdafx.h"
#include <iostream>
#include <math.h>
using namespace std;
double fallingDistance(int);
int main()
{
double d = 0;
for (int i = 1; i <= 10; i++) {
d = fallingDistance(i);
cout << i << " Seconds " << "Distance " << d << endl;
}
return 0;
}
double fallingDistance(int t)
{
double d = 0;
const double g = 9.8;