Important alert: (current site time 7/15/2013 6:27:15 PM EDT)
 

winzip icon

Diamond Script

Email
Submitted on: 11/7/2002 2:24:52 PM
By: James Conway 
Level: Beginner
User Rating: By 14 Users
Compatibility: C, C++ (general), Microsoft Visual C++, Borland C++
Views: 16796
author picture
(About the author)
 
     A basic diamond script.
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

11/8/2002 11:43:57 AM// Super Coder

Good diamond script. I had to do that same thing in school, but We had to do it with numbers. It looked like this...

1
212
32123
4321234
543212345
65432123456
7654321234567
876543212345678
98765432123456789
876543212345678
7654321234567
65432123456
543212345
4321234
32123
212
1

Good job once agian James 5 out of 5!!!
(If this comment was disrespectful, please report it.)

 
11/8/2002 11:47:21 AM// Super Coder

Hmm let me try that diamond again. lol

1
212
32123
4321234
543212345
65432123456
7654321234567
876543212345678
98765432123456789
876543212345678
7654321234567
65432123456
543212345
4321234
32123
212
1

(If this comment was disrespectful, please report it.)

 
11/8/2002 11:48:01 AM// Super Coder

Well I guess thats not going to work...
(If this comment was disrespectful, please report it.)

 
2/24/2003 8:38:48 PM

hey someone i really need help creating a diamond... but i need to use input on both the size of the diamond and character to be used... can someone help me... if so my AIM/AOL screen name is Tknnames
(If this comment was disrespectful, please report it.)

 
2/24/2003 8:39:55 PM

hey anyone i need help on writing a diamond but im using many functions like get size and get character as inputs from a user to draw a diamond... if you can help ... send me a message on AIM/AOL = tknnames
(If this comment was disrespectful, please report it.)

 
2/24/2003 8:42:23 PM

i need it to look like this....

*
***
*****
*******
*****
***
*
(If this comment was disrespectful, please report it.)

 
2/24/2003 8:42:56 PM

maybe not like that, haha
(If this comment was disrespectful, please report it.)

 
2/25/2003 1:35:32 AMJames Conway

lol thats easy. You should have been able to figure that out just by looking at the code, but I will aim and and show you how it's done...
(If this comment was disrespectful, please report it.)

 
7/10/2004 4:02:37 PM

on your program what line tells the program if it is an even number to change it to the next odd number?
(If this comment was disrespectful, please report it.)

 
2/28/2005 6:36:12 PM

i really need help with a diamond program that lets the used input the character to make the diamond and let the user determine the length of it. One more thing, i need the diamond to only output a character in odd numbers
example if * was the char and i typer in 5
*
***
*****
***
*
thx
(If this comment was disrespectful, please report it.)

 
2/28/2005 6:36:58 PM

if you can help email me at cometbasketball26@yahoo.com
(If this comment was disrespectful, please report it.)

 
2/28/2005 9:23:24 PM

or im on aol at franks2308
(If this comment was disrespectful, please report it.)

 
3/1/2005 11:50:44 AM

or my teacher will rape me
(If this comment was disrespectful, please report it.)

 
6/22/2007 11:24:56 PMSPARKLES

(load "C:\\Program Files\\GIMP-2.0\\share\\gimp\\2.0\\scripts\\diamond.scm") ERROR: unbound variable (errobj //)
THAT WAS THE ERROR MESSAGE I GOT H.E.L.P. PLZZZZZ TY
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.