Thanks :D
Type: Posts; User: mc74
Thanks :D
The assignment is for the default constructor to automatically insert the date "01/01/2013" if no other date in input.
Mmm...no value in the first piece.
Bear with me..I'm not good with programming, and I don't like it. Just gotta pass this C++ class...I try my best though :3
a has a value of 5...
Hello programmers,
I am trying to write a simple class, with a default constructor to output a date. All it has to do, is output the date "01/01/2013" (MM/DD/YYYY format). I'm compiling, and...
Here is my working code:
#include <iostream>
#include <cstdlib>
using namespace std;
double ConvertToMPH (int paceInMin, int paceInSec);
root4, attempt 3 did compile but I got garbage data.
I figured it out! It works correctly now! Thanks for the nudges, fellas! Much appreciated!!
:D
I am taking a C++ class, but I pulled this out of the book to try for some practice.
Here is the actual question:
You would like to know how fast you can run in Miles Per Hour. Your treadmill...
Sorry man! Here is some code of things I have tried! :cool:
#include <iostream>
#include <cstdlib>
using namespace std;
double ConvertToMPH (int paceInMin, int paceInSec);
I tried calling ConvertToMPH after each cin, and I got a lot of errors.
I also tried to call it after the cout, cin block. Ran, but it only took the input and exited out of teh program.
Ah, right. I have never been good with functions. That's why I'm playing around with this for practice.
I tried this, it runs, but I get automatic garbage data :/
cout << "Please enter...
I'm trying to write a program to convert your pace in minutes and seconds to MPH. All the program is doing is taking in the input of minutes and seconds. What am I doing wrong?
#include...
Got it:
feetIn = feet * 12;
totInch = feetIn + inches;
inches = totInch - 60;
ideal = inches * 5 + 110;
I have been thinking math. That's my problem. I just don't know what I am missing.
Do I need an "if" statement at all?
This equation works for heights exceeding 5 feet, but not lower than 5 feet.
ideal = 110 + (inches * 5) + 60;
Here's some up dated code:
#include <iostream>
using namespace std;
int main( )
{
int feet;
I'm sorry...call me stupid...but none of this is clicking for me...
Here's something....
ideal = 110 + 5 * inches = 5ft + 5 inches
I have. And I have gotten nowhere.
-thinks intently-...
Sorry...I got nothin'...
:(
Hello everyone! I hope someone can help me. I'm not very good with programming, so please bear with me, because I'm sure this is very simple for better programmers. But I digress. I am trying to...