The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
Draw Box
Posted by: matviy | August 4, 2007 @ 5:41pm
Other Code
[
Download
]
#include <iostream.h> int main() { int line = 1; //line counting cariable char space[20] = " "; //Space variable char c[2] = ""; //Character to draw the box with. //Prompts user to give "c" a vale. cout << "Please enter a single character (eg. *,%,R,7): "; cin.getline(c,2); //Should begin the loop while (11 < line); //for some reason, this dosnt start the loop. 11 < line does start it. { if ((line = 1) || (line = 10)); //Should draw the first, or last line. { cout << "\n" << c << c << c << c << c << c << c << c << c << c << c << c << c << c << c << c << c << c << c << c; line = 1 + line; } if ((line > 1) && (line < 10)); //Should draw all the lines in between, of the line value is between 1-10 { cout << "\n" << c << space << c; line = 1 + line; } } }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.53 / 8
729 Votes
http://codebin.yi.org/37
page generated in 0.01 seconds