基本信息
源码名称:一个使用nurses编写的终端程序
源码大小:3.02KB
文件格式:.c
开发语言:C/C++
更新时间:2021-06-17
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
#include"stdio.h"
#include"unistd.h"
#include"stdlib.h"
#include"string.h"
#include"curses.h"
#include"time.h"
void shuaxin (void);
int Sleep(unsigned long x);
void shan (void);
void shan2 (void);
int main()
{
int i;
int j;
initscr();
//显示三组文本,每个一秒显示在屏幕上
move(5,10);
attron(A_BOLD);
printw("%s","Mr.xu");
attroff(A_BOLD);
refresh();
sleep(1);
move(8,13);
attron(A_STANDOUT);
attron(A_BOLD);
printw("%s","Do you still remember?");
attroff(A_STANDOUT);
refresh();
sleep(1);
move(10,15);
standout();
printw("%s","The yearning life of childhood:");
shuaxin();
move(11,23);
printw("%s","Has it come true?");
shuaxin();
move(12,15);
printw("%s","The paper plane of childhood:");
shuaxin();
move(13,23);
printw("%s","Where did it fly?");
shuaxin();
move(14,15);
printw("%s","Now what are you hesitating about");
shuaxin();
move(15,23);
printw("%s","Bread or love?");
shuaxin();
move(16,15);
printw("%s","Such a day like this");
shuaxin();
move(17,23);
printw("%s","How long will it take?");
shuaxin();
for(i=0; i<6; i )
{
flash();
Sleep(300);
}
Sleep(500);
move(10,15);
clrtobot();
printw("%s","How are you going to escape!!!");
shan();
move(13,15);
printw("%s","How are you going to escape!!!");
shan();
move(16,15);
printw("%s","How are you going to escape!!!");
shan();
move(19,15);
printw("%s","How are you going to escape!!!");
shan();
move(22,15);
printw("%s","How are you going to escape!!!");
shan();
for(i=0; i<11; i )
{
flash();
Sleep(100);
}
Sleep(500);
clear();
move(8,13);
clrtobot();
printw("%s","NOW ! ! !");
shuaxin();
move(10,15);
printw("%s","Here's a perfect opportunity!");
shuaxin();
move(12,15);
printw("%s","Welcome to Kylin!");
shuaxin();
move(14,15);
printw("%s","Right now, right now!!");
shuaxin();
move(16,15);
printw("%s","Keep away from the construction site!!");
shuaxin();
Sleep(2000);
flash();
clear();
for(j=0; j<20; j )
{
clear();
for(i=0; i<LINES-1; i )
{
move(i,15);
printw("%s","looking forward to your joining");
shan2();
}
}
//将光标移动到屏幕的右下角,然后结束程序
move(LINES -1,COLS -1);
refresh();
Sleep(10000);
endwin();
exit(EXIT_SUCCESS);
}
void shuaxin (void)
{
refresh();
Sleep(3000);
}
void shan (void)
{
flash();
refresh();
Sleep(2000);
}
void shan2 (void)
{
flash();
refresh();
Sleep(100);
}
int Sleep(unsigned long x) //等待函数
{
clock_t c1=clock(),c2;
do
{
if((c2=clock())==(clock_t)-1) //错误
return -1;
}
while(1000.0*(c2-c1)/CLOCKS_PER_SEC<x); //由于c1,c2是无符号整形数乘1000将其转换为浮点数
return 0;
}
#include"stdio.h"
#include"unistd.h"
#include"stdlib.h"
#include"string.h"
#include"curses.h"
#include"time.h"
void shuaxin (void);
int Sleep(unsigned long x);
void shan (void);
void shan2 (void);
int main()
{
int i;
int j;
initscr();
//显示三组文本,每个一秒显示在屏幕上
move(5,10);
attron(A_BOLD);
printw("%s","Mr.xu");
attroff(A_BOLD);
refresh();
sleep(1);
move(8,13);
attron(A_STANDOUT);
attron(A_BOLD);
printw("%s","Do you still remember?");
attroff(A_STANDOUT);
refresh();
sleep(1);
move(10,15);
standout();
printw("%s","The yearning life of childhood:");
shuaxin();
move(11,23);
printw("%s","Has it come true?");
shuaxin();
move(12,15);
printw("%s","The paper plane of childhood:");
shuaxin();
move(13,23);
printw("%s","Where did it fly?");
shuaxin();
move(14,15);
printw("%s","Now what are you hesitating about");
shuaxin();
move(15,23);
printw("%s","Bread or love?");
shuaxin();
move(16,15);
printw("%s","Such a day like this");
shuaxin();
move(17,23);
printw("%s","How long will it take?");
shuaxin();
for(i=0; i<6; i )
{
flash();
Sleep(300);
}
Sleep(500);
move(10,15);
clrtobot();
printw("%s","How are you going to escape!!!");
shan();
move(13,15);
printw("%s","How are you going to escape!!!");
shan();
move(16,15);
printw("%s","How are you going to escape!!!");
shan();
move(19,15);
printw("%s","How are you going to escape!!!");
shan();
move(22,15);
printw("%s","How are you going to escape!!!");
shan();
for(i=0; i<11; i )
{
flash();
Sleep(100);
}
Sleep(500);
clear();
move(8,13);
clrtobot();
printw("%s","NOW ! ! !");
shuaxin();
move(10,15);
printw("%s","Here's a perfect opportunity!");
shuaxin();
move(12,15);
printw("%s","Welcome to Kylin!");
shuaxin();
move(14,15);
printw("%s","Right now, right now!!");
shuaxin();
move(16,15);
printw("%s","Keep away from the construction site!!");
shuaxin();
Sleep(2000);
flash();
clear();
for(j=0; j<20; j )
{
clear();
for(i=0; i<LINES-1; i )
{
move(i,15);
printw("%s","looking forward to your joining");
shan2();
}
}
//将光标移动到屏幕的右下角,然后结束程序
move(LINES -1,COLS -1);
refresh();
Sleep(10000);
endwin();
exit(EXIT_SUCCESS);
}
void shuaxin (void)
{
refresh();
Sleep(3000);
}
void shan (void)
{
flash();
refresh();
Sleep(2000);
}
void shan2 (void)
{
flash();
refresh();
Sleep(100);
}
int Sleep(unsigned long x) //等待函数
{
clock_t c1=clock(),c2;
do
{
if((c2=clock())==(clock_t)-1) //错误
return -1;
}
while(1000.0*(c2-c1)/CLOCKS_PER_SEC<x); //由于c1,c2是无符号整形数乘1000将其转换为浮点数
return 0;
}