Master For Loops and If Statements with C++ Homework Help | GetCode.me

  • Context: Comp Sci 
  • Thread starter Thread starter Biosyn
  • Start date Start date
  • Tags Tags
    C++ Loop
Click For Summary
SUMMARY

The forum discussion focuses on mastering For Loops and If Statements in C++ as part of a homework assignment. A user shared their attempt at solving a problem presented in a video, specifically from the 6:19 mark, which is labeled "Extra Credit." The feedback indicates that the user's code does not reproduce the expected output pattern, highlighting the importance of correct implementation. Emphasis is placed on the necessity of proper code formatting for readability and debugging.

PREREQUISITES
  • Understanding of C++ syntax and structure
  • Familiarity with control flow concepts, specifically For Loops
  • Knowledge of conditional statements, particularly If Statements
  • Experience with code formatting and indentation for readability
NEXT STEPS
  • Review C++ For Loop syntax and usage
  • Study C++ If Statement implementation and best practices
  • Explore debugging techniques for C++ code
  • Learn about code formatting tools and practices for C++
USEFUL FOR

C++ students, educators, and anyone looking to improve their programming skills in control flow structures and code readability.

Biosyn
Messages
114
Reaction score
0

Homework Statement

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


Homework Equations



For Loops
and If Statements?

The Attempt at a Solution



Here is my attempt at the problem:

http://www.getcode.me/3sr0mzy7rz1cgrfu
 
Last edited by a moderator:
Physics news on Phys.org
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:
[/noparse] tags. Please pay attention to formatting - correct indentation and line spacing are crucial for code readability.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K