Solved

ANSCII Code

Posted on 2000-02-26
2
315 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

724 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