1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: C++ For Loop Help needed

  1. Nov 7, 2012 #1
    1. The problem statement, all variables and given/known data

    Hello, the problem is in this video. It is displayed near the end starting from 6:19 onward. It's titled "Extra Credit"

    2. Relevant equations

    For Loops
    and If Statements?

    3. The attempt at a solution

    Here is my attempt at the problem:

    http://www.getcode.me/3sr0mzy7rz1cgrfu [Broken]
    Last edited by a moderator: May 6, 2017
  2. jcsd
  3. Nov 7, 2012 #2


    User Avatar

    Staff: Mentor

    Your program doesn't reproduce the pattern, so it is wrong. I guess that's not kind of the answer you were expecting, but there is really not much more that can be said.

    You can post your code here using [noparse]
    Code (Text):
    [/noparse] tags. Please pay attention to formatting - correct indentation and line spacing are crucial for code readability.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook