Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.