Язык Turbo C 2.0
Текст
1 - 12k, 2 - 13k
*/
#include <conio.h>
#include <stdio.h>
main ()
{
int a, b;
char d [] = "Это строка ";
char e [288];
/* p54 - 1 */
clrscr ();
gotoxy (40, 13);
putch ('*');
getch (); /* п-1 */
/* p54 - 2 */
window (1, 1, 40, 12);
textbackground (WHITE);
clrscr ();
window (41, 1, 80, 12);
textbackground (RED);
clrscr ();
window (1, 13, 40, 25);
textbackground (LIGHTRED);
clrscr ();
window (41, 13, 80, 25);
textbackground (GREEN);
clrscr ();
getch (); /* п-2 */
/* p55 - 3 */
textbackground (WHITE);
gotoxy (1, 12);
for (a = 0; a < 15; a++)
{
textcolor (a);
printf ("%-4i", a);
}
getch (); /* п-3 */
/* p150 - 4 */
window (1, 1, 80, 25);
clrscr ();
getch ();
for (a = BLUE; a <= WHITE; a++)
{
for (b = BLACK; b <= LIGHTGRAY; b++)
{
textcolor (a);
textbackground (b);
cprintf ("тест");
}
cprintf ("\n");
}
textcolor (WHITE|BLINK);
textbackground (BLACK);
cprintf ("конец теста");
getch (); /* п-4 */
/* p152 - 5 */
window (5, 5, 20, 10);
textattr ((GREEN << 4) + RED);
clrscr ();
getch (); /* п-5 */
cputs ("\nПривет, мир\n\n\r");
textattr ((GREEN << 4) + RED + BLINK);
cputs ("Нажмите любую клавишу");
getch (); /* п-6 */
window (1, 1, 80, 25);
gettext (4, 4, 21, 11, e);
textbackground (BLUE);
textcolor (WHITE);
clrscr ();
getch ();
for (a = 1; a < 23; a++)
{
gotoxy (1, a);
cputs (d); cputs (d); cputs (d); cputs (d);
}
getch (); /* п-7 */
puttext (24, 5, 41, 12, e);
getch (); /* п-8 */
for (a = 1; a < 5; a++)
movetext (22, 4, 32, 8, 10 * a, 17);
getch (); /* п-9 */
/* Exit */
window (1, 1, 80, 25);
textbackground (BLACK);
textcolor (LIGHTGRAY);
clrscr ();
}
Присоединяйтесь — мы покажем вам много интересного
Присоединяйтесь к ОК, чтобы подписаться на группу и комментировать публикации.
Комментарии 4