To print a Parallelogram of stars in C++ - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

To print a Parallelogram of stars in C++

a3adebutua3adebutu Posts: 2Member
As a fresh student in c++,I will like to get the C++ code of printing a Parallelogram of stars whose sides are equal to the number n that the user inputs.Use of Loop function(for or While) is required.Its not a homework,its just a personal practice assignment.Thank you.

Comments

  • Ed HallEd Hall Posts: 395Member
    : As a fresh student in c++,I will like to get the C++ code of printing a Parallelogram of stars whose sides are equal to the number n that the user inputs.Use of Loop function(for or While) is required.Its not a homework,its just a personal practice assignment.Thank you.
    :

    This is a fairly simple task that you should be able to do with only a little trial and error (only about a dozen lines of code). Most of the members of this very helpful venue will offer assistance for programmers that post "troubled" code, but very few will write the code for you. If you are studying C++ then you wouldn't gain as much from someone else's code until you learn from building your own. After you have built your program (or if you have trouble with your code), you could post it here and ask for help. Then others would provide suggestions. If you post code please use code tags like this:

    [leftbr]code[rightbr]
    ...
    lines of code
    ...
    [leftbr]/code[rightbr]

    This keeps the code formatting which helps others read through and lend assistance.

    As to your specific program, you should study cout, cin and for(). Then step through the construction of your code a small piece at a time. You could probably start with the basic "Hello world" program and build from there. Hint: Keep in mind that "
    " in a cout statement will drop to a new line of print.

    Take Care,
    Ed


Sign In or Register to comment.