Okay, here's the question:
1. Write a C program that asks the user to enter a height and then generates a diamond pattern based on the entered height using nested for loops. For example, if the user enters 9 for height, the program should generate the following pattern:
----*----
---*-*---
--*---*--
-*-----*-
*-------*
-*-----*-
--*---*--
---*-*---
----*----
Please note that i used dashs (-) instead of spaces because yahoo won't display it well! Here's also a link to the original question:
http://cmpe.emu.edu.tr/cmpe101/pages/lab...
Please I need help on this and if you can do it, please include some explanations because i want to learn the concept! i've battled with this for a while and i can't seem to make a head way!
All i know is that number entered by the user give the heght and width of the diamond.
Help with C programming assignment!?
post your code, and we can let you know where you are going wrong. I personally wont DO your homework for you, but Im more than willing to help point you in the right direction.
Reply:Well done, someone actually does their own work :) Report It
Reply:its a good assignment
Reply:Have you flowcharted it? If you can flowchart it the programming is not difficult. If you can't flowchart it your problem is in the logic not the programming.
Get down on paper exactly how the steps go, and when you can walkthrough it and get the right pattern, then code it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment