Solved

ANSCII Code

Posted on 2000-02-26
2
294 Views
Last Modified: 2012-06-27
Hi, all experts

  Do any body know the ANSCII code for

border like MS WORD (ex. |========) for console program or dos enviroment. I am not really sure it is probably around 2 hundred something...  

Any body have an idea and want to challeng

Ly





 
0
Comment
Question by:lseng
  • 2
2 Comments
 
LVL 1

Expert Comment

by:roaknog
ID: 2561530
#include <stdio.h>

void main(){
for(int i= 0; i < 70; i++){
 printf("%c",char(205));}
}
0
 
LVL 1

Accepted Solution

by:
roaknog earned 3 total points
ID: 2561602
// for a square
#include <stdio.h>

void main(){
      int c = 0, r = 0, letter = 0, rows = 20, collumns = 40;

      for(r = 0; r < rows+1; r++){
      for(c = 0; c < collumns+1; c++){
// conditions
            if((r == 0 || r == rows) && (c > 0 && c < collumns))letter = 205;//top and bottom
            if(r == 0 && c == 0) letter = 201;// top left
            if(r == 0 && c == collumns)letter = 187;// top right
            if(r == rows && c == 0) letter = 200;// bottom left
            if(r == rows && c == collumns)letter = 188;// botoom right
            if(r > 0 && r < rows && c > 0 && c < collumns)letter = 32;//center
            if((r > 0 && r < rows) && (c == 0 || c == collumns))letter = 186;//sides
      printf("%c",char(letter));}
      printf("\n");}}
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question