Very new to c++ help writing code

Im very new to c++ and I was wondering if anyone could help me write it. Im not saying do the whole thing for me but help me start it and understand it. Thanks

The problem is
Arnie likes to jog in the morning. As he jogs, he counts the number of strides he makes during the first minute and then again during the last minute of his jogging. Arnie then averages these two and calls this average the number of strides he makes in a minute when he jogs. Write a program that accepts this average and total time Arnie spends jogging in hours and minutes and then displays the distance Arnie has jogged in miles. Assume Arnie's stride is 2.5feet(also a data item). There are 5280 feet in a mile ( a constant)
Last edited on
here are the steps:
cin>>average; cin>>hours; cin>>minutes;
convert total time to seconds
calculate distance based on average and time
cout<<distance;
Im not sure what to do next






// Pre-compiler directives
#include <iostream>

using namespace std;

// constant declaration
const float FeetperStide = 2.5;
const float FeetinMile = 5280;

// main program

int main ()
{
// Local Identifiers
int FirstminuteStides, LastminuteStrides, Hours, Minutes, TotalMinutes;
float TotalStides, AverageStridesPerminute, TotalFeet, TotalMiles;

Last edited on
int main ()
{
// Local Identifiers
int Hours, Minutes, TotalMinutes;
float TotalStides, AverageStridesPerminute, TotalFeet, TotalMiles;

float average;

// input module
cin>>average;cin>>Hours;cin>>Minutes;

TotalMinutes = Minutes + (Hours*60 );
float Distance = (calculate this using the formula in the assignment)

cout<<Distance;
Topic archived. No new replies allowed.