WINDOWS作業系統:
//---------------------------------------------------------------------------
#include <stdio.h>
#include <conio.h>
int main(void)
{
char c;
while ((c=getch())!="q")
putchar("*");
return 0;
}
LINUX作業系統:
#include <curses.h>
initscr();
cbreak();
noecho();
while (getch()!="q") addch("*");
echo();
nocbreak;
endwin();
/*編譯時要加上 -lcurses 引數*/
WINDOWS作業系統:
//---------------------------------------------------------------------------
#include <stdio.h>
#include <conio.h>
int main(void)
{
char c;
while ((c=getch())!="q")
putchar("*");
return 0;
}
//---------------------------------------------------------------------------
LINUX作業系統:
//---------------------------------------------------------------------------
#include <curses.h>
int main(void)
{
initscr();
cbreak();
noecho();
while (getch()!="q") addch("*");
echo();
nocbreak;
endwin();
return 0;
}
/*編譯時要加上 -lcurses 引數*/
//---------------------------------------------------------------------------