Friday, June 28, 2013

Program to determine width of the output screen

Problem:
To find the width of the output screen, which is used in program of moving text without using graphics function

Solution:
//width of the output screen
#include<stdio.h>
#include <conio.h>
#include<dos.h>

int main(void)
{  

int x=0;
clrscr();

while (!kbhit()
{
clrscr();
gotoxy(x, 12);
printf("Hello world");
delay(100);
x++;

}
printf(" /n width of the screen %d",x);
getch();
return 0;
}


Output:
image
See the Below video for procedure:-





Like the Post? Do share with your Friends.

No comments:

Post a Comment