Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 394 Vote(s) - 3.58 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[C++] BMR Calculator

#1
After taking a look at one of my college systems, it described a system and formulas to create a BMR (Basal Metobolic Rate) calculator, and I misread the assignment thinking I had to code the system, which I didn't. But I coded the system anyway, so I though I'd share it with you here! I've tested it for both male and female, several heights and weight, and as far as I can tell it runs perfectly! (P.S if anyone knows how to add an icon to console applications, please let me know)

The Code:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Reply

#2
Nice of you to post the source
Reply

#3
I think you deserve the Coder award. Great share man.
Reply

#4
Thanks guys. I'm picking up C++ rather quickly actually. I'm so glad I started learning it in college.
Reply

#5
There's just about twice as much code here from what is really necessary.
Reply

#6
Not bad, but there is a snippet of code in there that is repeated twice for no real reason. Hopefully by now you've learned to optimize a program such as this. Nonetheless, nice!
Reply

#7
Quote:(09-14-2013, 12:40 AM)Aristotle Wrote:

[To see links please register here]

Not bad, but there is a snippet of code in there that is repeated twice for no real reason. Hopefully by now you've learned to optimize a program such as this. Nonetheless, nice!

lol, I pointed this out months ago.
Reply

#8
Quote:(09-14-2013, 12:43 AM)cxS Wrote:

[To see links please register here]

lol, I pointed this out months ago.

My mistake, I thought the thread had said it had 0 replies! Next time, I'll be sure to check.
Reply

#9
Here's a way you can encapsulate it's functionality:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Disregarding the user input parsing, there's an example of its usage as well. If you wanted it to say "BMR: {value} or something like that, obviously you'd overload the << operator.
Reply

#10
Quote:(12-10-2013, 05:50 AM)Oni Wrote:

[To see links please register here]

Code-critique, almost a year late. :tongue:

How so?

[To see links please register here]

(I gave my critique here, OP didn't so anything at all with my suggestions and went silent. This is just my version of doing it, not a critique.)

Doesn't really matter though as others would benefit from reading the replies. The C/C++ forum is like the graveyard anyways.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through