Here is the code I'm trying to program:
#include %26lt;iostream%26gt;
#include %26lt;iomanip%26gt;
using namespace std;
void GetData(float %26amp;miles, float %26amp;hours);
int main()
{
float miles;
float hours;
float milesPerHour;
GetData(miles, hours);
milesPerHour = miles / hours;
cout %26lt;%26lt; setw(10) %26lt;%26lt; miles %26lt;%26lt; setw(10) %26lt;%26lt; hours %26lt;%26lt; setw(10) %26lt;%26lt; milesPerHour %26lt;%26lt; endl;
return 0;
}
void GetData(float %26amp;%26lt;span class='searchlite'%26gt;miles%26lt;/span%26gt;, float %26amp;hours)
{
cout %26lt;%26lt; "Enter number of %26lt;span class='searchlite'%26gt;miles%26lt;/span%26gt;%26gt; ";
cin %26gt;%26gt; miles;
cout %26lt;%26lt; "Enter number of hours%26gt; ";
cin %26gt;%26gt; hours;
}
Anybody know C++/Alogrithim program for Miles?
What's the question?
Reply:Why are you putting HTML into your c++ code?
o.O
void GetData(float %26amp;float,float %26amp;hours)
{
cout %26lt;%26lt; "Enter number of miles";
cin %26gt;%26gt; miles;
cout %26lt;%26lt; "Enter number of hours";
cin %26gt;%26gt; hours;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment