Added: 1 year ago
From: njoker555
Views: 5,277
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (22)

Sign In or Sign Up now to post a comment!
  • can you explain why we need the '.'?

  • @562Krylon The period isn't needed, it's just there so that when it outputs the result in a sentence, the sentence ends with a period. < like that sentence.

  • i like your birds:))

  • @Iuliano99dmg thanks :)

  • Hello sir, love your programs. Can you please help with a geometry calculator?

  • @Mrbroadcast1 Sure I'll try to help, feel free to send me a msg. 

  • any tips on how to incorporate that formula in there

  • thanks for the reply im trying to write a calculator for an ellipse using the formula (PI * long axis * short axis) / 4 and tips

  • @jhelms87 cool, good luck :) let me know if you need, help, I'll do my best to help :)

  • @njoker555 hey im having some trouble debugging the code, the black screen pops up and i get to insert a number for it but when i press enter the window automatically shuts off ... u have any clue??

  • @HardkoreRocker do you have system("pause") in the program after the output? that or cin.get() should allow the program to stay on after it outputs the result.4

  • @njoker555 yes my friend!! i tried that and it worked, i appreciate ur fast response bud, keep it up, peace!

  • @HardkoreRocker great! Glad I could help :)

  • any tips for incorporating that formula in code to make a calculator?

  • @jhelms87 first thing is that C++ doesn't know what the value of Pi is directly. You'll have to declare Pi as a variable and state it's value. Then declare the long and short axis' as variables and have a cout prompt and ask the user to input the values for each. You'll also have to declare a variable like "ellipse" to hold the final value of the equation. And then just solve for it the way the formula is written. That's one way of doing it.

  • i worte the code in dev c++ should it still work??

  • @jhelms87 yeah that should work just fine.

  • It's much better practice to use cin.get() versus a system pause.

  • @yoyofargo It may be. I've only used it a few times but never got used to it. I may introduce it in a future tutorial and explain it but system pause is pretty good for beginners, it becomes self explanatory after a while for them.

    Thanks :)

  • Thank you so much. Because of this example I am able to complete my Tuesday assignment for Intro to Programming. I am already on my third Module and its actually working! xD

  • Man im crap at math

  • @LamsasukeMedia I'd fix that, programming is a fun way to do it too.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more