Howdy, Stranger!

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

Categories

display a diamond

mrmidomrmido Member Posts: 1
I am wanting to find out how to display a diamond in C++ so that the first line is an *, the next line is *1space*, next *3spaces*, next line is *5spaces* and then closes back, ie: next line is *3 spaces*, then * * and last line is *
It needs to be interactive with the user. Ie: width is specified by the integer. If the user enters 11, the diamond will be 11 lines tall, 11 characters wide.

Thank you.

Comments

  • scuba22scuba22 Member Posts: 61
    :
    it makes me think that you need to do a little reading...



    I am wanting to find out how to display a diamond in C++ so that the first line is an *, the next line is *1space*, next *3spaces*, next line is *5spaces* and then closes back, ie: next line is *3 spaces*, then * * and last line is *
    : It needs to be interactive with the user. Ie: width is specified by the integer. If the user enters 11, the diamond will be 11 lines tall, 11 characters wide.
    :
    : Thank you.
    :

  • Andre YoungAndre Young USAMember Posts: 0

    _ / http://forcoder.org / free ebooks and video tutorials about [ C Go Assembly Visual Basic PHP MATLAB Visual Basic .NET Python Scratch Delphi Java Ruby PL/SQL Objective-C C++ R C# Swift JavaScript Perl Fortran Crystal SAS Erlang Clojure COBOL D VBScript Transact-SQL Bash ABAP FoxPro Lisp Lua Apex Hack F# LabVIEW Alice Kotlin Dart Julia Awk Logo Rust ML Scheme Ada Scala Prolog ] __________

Sign In or Register to comment.