We can draw a box in cprogram by using only one printf();&
without using graphic.h header file?
Answer Posted / penchalaiahdinesh
There is another method to print a box without using
graphic.h
using Ascii values
You can see ascii values by running following program..
#include<stdio.h>
#include<conio.h>
main()
{
int i;
clrscr();
for(i=0;i<=255;i++)
printf("%d %c\t",i,i);
getch();
}
The below are the program to print a clear box
#include<stdio.h>
#include<conio.h>
main()
{
int i=218,j,k=1;
clrscr();
printf("%c",i);
x:i=196;
for(j=1;j<=10;j++)
printf("%c",i);
if(k==2)
goto y;
i=191;
printf("%c\n%c %c\n%c",i,179,179,192);
if(k==1)
{k=2;goto x;}
y:printf("%c",217);
getch();
}
Just this and reply me........
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What are c header files?
What is c standard library?
What is meant by type casting?
Is c dynamically typed?
How are pointers declared in c?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
Can a program have two main functions?
What is typedef example?
Why header files are used?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
how to construct a simulator keeping the logical boolean gates in c
Is int a keyword in c?
What are data types in c language?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)