We can draw a box in cprogram by using only one printf();&
without using graphic.h header file?
Answers were Sorted based on User's Feedback
Answer / parmjeet kumar
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\n______________\n|______________|");
getch();
}
output:
______________
|______________|
Is This Answer Correct ? | 16 Yes | 9 No |
Answer / 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 |
Answer / chandan kumar r
yes the code is currect
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\n______________\n|______________|");
getch();
}
output:
______________
|______________|
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / mohan reddy
yes the code is currect
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\n______________\n|______________|");
getch();
}
output:
______________
|______________|
Is This Answer Correct ? | 6 Yes | 7 No |
What is p in text message?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What is the use of the restrict keyword?
What is calloc malloc realloc in c?
What is difference between structure and union in c programming?
Explain what are the standard predefined macros?
Explain how can I convert a string to a number?
what is computer
What does c value mean?
how to multiply two number taking input as a string (considering sum and carry )
What is the most efficient way to count the number of bits which are set in an integer?
where do we use volatile keyword?