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:
See the Below video for procedure:-
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:
See the Below video for procedure:-
No comments:
Post a Comment