📄 prog6
字号:
/*
##########################################################
# #
# #
# PARESH CHHOTUBHAI #
# CS 362 A #
# SPRING 1988 #
# " C " LANGUAGE #
# ASSIGNMENT #4 #
# DUE DATE : APRIL 5,1988 #
# MR. DAVID JOHNSON #
# #
# #
##########################################################
THIS PROGRAM IS WRITTEN IN SUCH A WAY THAT IT FORMS
A BOX MADE OF ASCII CHARACTERS ON THE SCREEN. INSIDE THE BOX
FEW DOCUMENTATIONS CONCERNING THIS CLASS ARE INSERTED.
AT THE END OF THE LAST DOCUMENTATION, AN EXECUTION
LINE IS INSERTED FOR THE OPTION TO CONTNUE,'PRESS C TO
CONTINUE.
THIS PROGRAM USES THE FOLLOWING FUNCTIONS :
C/S,SETCUR,INKEY.
THE FOLLOWING CHARACTERS ARE USED FOR THE BOX:
BA (SIDE) BB (TOP RIGHT)
CD (SIDE) BC (BOTTOM RIGHT)
CB (BOTTOM LEFT) C9 (TOP LEFT)
*/
main()
{
#define ROW_MAX 20
#define TABLES_MAX 79
int row,tables,c;
int month,day,year;
char key;
cls ();
key = 0xC9;
tables = 0;
setcur(0,tables);
printf("%c",key);
key = 0xcd;
for(tables=1;tables<=TABLES_MAX;tables++)
{
setcur(0,tables);
printf("%c",key);
}
tables = TABLES_MAX;
key = 0xbb;
tables = 79;
setcur(1,tables);
printf("%c",key);
row++;
key = 0xbb;
tables = 79;
setcur(0,tables);
printf("%c",key);
tables = 79;
setcur(row,tables);
printf("%c",key);
row++;
/*
*/
key = 0xba;
tables = 0;
setcur(1,tables);
printf("%c",key);
tables = 0;
setcur(row,tables);
printf(" PARESH CHHOTUBHAI ");
tables = 79;
setcur(1,79);
printf("%c",key);
row++;
/*
*/
key = 0xba;
tables = 0;
setcur(row,tables);
printf("%c",key);
tables = 0;
key = 0xba;
tables = 0;
setcur(2,tables);
printf ("%c",key);
printf(" CS 362 A");
tables = 79;
setcur(2,79);
printf("%c",key);
row++;
/*printf ("\n");
*/
key = 0xba;
tables = 0;
setcur(3,tables);
printf("%c",key);
tables = 1;
setcur(row,tables);
printf(" SPRING 1988 ");
tables = 79;
setcur(3,tables);
printf("%c",key);
printf ("\n");
/*
*/
key = 0xba;
tables = 0;
setcur(4,tables);
printf("%c",key);
tables = 1;
setcur(4,tables);
printf(" ASSIGNMENT #'s 3 & 4 COMBINED ");
tables = 79;
setcur(4,tables);
printf("%c",key);
/*printf ("\n");
*/
month = 5;
day = 5;
year = 1988;
key = 0xba;
tables = 0;
setcur(row,tables);
printf("%c",key);
tables = 25;
setcur(row,tables);
printf(" DUE DATE : 5/5/1988 ");
tables = 79;
setcur(5,tables);
printf("%c",key);
row++;
/*
*/
key = 0xba;
tables = 0;
setcur(row,tables);
printf("%c",key);
tables = 25;
setcur(row,tables);
printf(" MR. DAVID JOHNSON ");
tables = 79;
setcur(6,tables);
/*
*/
key = 0xba;
tables = 0;
setcur(row,tables);
printf("%c",key);
tables = 79;
setcur(row,tables);
printf("%c",key);
row++;
/*
======================
*/
key= 0xba;
tables = 0;
setcur(7,tables);
printf("%c",key);
tables = 25;
setcur(row,tables);
printf(" Press <C> to continue.");
tables = 79;
setcur(7,tables);
printf("%c",key);
/*
*/
key = 0xba;
do
{
tables = 79;
setcur(row,tables);
printf("%c",key);
tables = 79;
setcur(8,tables);
printf("%c",key);
row++;
}
while(row<=ROW_MAX-1);
key = 0xc8;
tables = 79;
setcur(row,tables);
printf("%c",key);
key = 0xcd;
for(tables=1;tables<=TABLES_MAX-1;tables++)
{
setcur(row,tables);
printf("%c",key);
}
key = 0xbc;
tables = 79;
setcur(row,tables);
printf("%c",key);
/*.....*/
/* key = 0xbc;
tables =TABLES_MAX;
setcur(row,tables);
printf("%c",key); */
/*
*/
do
{
c = tolower (inkey () );
}
while(c!='c');
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -