c倒计时10秒怎么写
1.c语言设计一段代码 10秒倒计时 在10秒内输入哈哈哈则倒计时停止
//Windows控制台程序
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<Windows.h>
DWORD WINAPI input(LPVOID);
int main()
{
HANDLE hinput = CreateThread(NULL, 0, input, NULL, 0, NULL);
DWORD dwResult = WaitForSingleObject(hinput, 10000);
DWORD dwExitCode;
switch(dwResult)
{
case WAIT_OBJECT_0:
GetExitCodeThread(hinput, &dwExitCode);
if(dwExitCode == 0)
{
printf("恭喜你,输入成功!\n");
}
else
{
printf("你输入的不是哈哈哈!\n");
}
break;
default:
printf("\n你没能在10秒内完成输入!\n");
}
system("PAUSE");
return 0;
}
DWORD WINAPI input(LPVOID p)
{
char str[100];
printf("请在10秒内输入哈哈哈:");
gets(str);
return strcmp(str, "哈哈哈");
}
2.怎么用C语言实现倒数十秒钟
#include<stdio.h>
#include<windows.h>
int random(int Seed);
int main()
{
long int i,j,k;
for(i=10;i>=1;--i)
{
printf(引号第%d秒……\n引号,i);
for(j=1;j<=20000;j++)
for(k=1;k<=20000;k++);
system(引号cls引号);
}
}
/* 打引号会被吞,请自行替换 */
/* 本程序效果视机器配置而定 */
/* PS:这是最没技术的写法……*/
3.怎么用C语言实现倒数十秒钟
#include
4.c语言编程十秒倒计时爱心,刚开始是从上往下十秒倒计时,最后变成
#include <stdio.h>
#include <time.h>
int main()
{int i,t;
for(i=3;i>0;i--)
{printf("%2d\b\b",i);
t=clock();
while(clock()<t+1000);
}
printf(" ** **\n");
printf(" * * * *\n");
printf(" * * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" * *\n");
printf(" *\n");
return 0;
}
5.用c语言怎么写秒计时器
#include<reg52.h>
#define uchar unsigned char
#define uint unsigned int
uchar tt,num;
uchar shi,ge,temp;
uchar code table[]=
{0x3f,0x06,0x5b,0x4f,<br>0x66,0x6d,0x7d,0x07,<br>0x7f,0x6f};
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void display(uchar shi,uchar ge)
{
shi=temp/10;
ge=temp%10; P2=table[shi];
P3=0xfe;
delay(1);
P2=0x00; P2=table[ge];
P3=0xfd;
delay(1);
P2=0x00;
}
void timer0() interrupt 1
{
TH0=-50000/256;
TL0=-50000%256;
tt++;
if(tt>=20)
{
tt=0;
temp++;
if(temp==60)
temp=0;
}
}
void init()
{
TMOD=0x01;
TH0=-50000/256;
TL0=-50000%256;
EA=1;
ET0=1;
TR0=1;
tt=0;
temp=0;
}
void main()
{
init();
while(1)
{
display(shi,ge);
}
} 这个是60秒的,供参考
6.51单片机做一个10秒倒计时的程序
C语言
#include<reg51.h>
#define uint unsigned int
#define uchar unsigned char
sbit p27=P2^7;//数码管位选端定义
uchar c,i;
//数码管译码表
unsigned char code NumDecode[] =
{
0XC0,//;0
0XF9,//;1
0XA4,//;2
0XB0,//;3
0X99,//;4
0X92,//;5
0X82,//;6
0XF8,//;7
0X80,//;8
0X90,//;9
};
void main()
{
i=0;//10秒计时设置
c=0;//中断次数计数
p27=1;//数码管位选端关闭
TMOD=1;//设置定时器0为工作方式1
TH0=(65536-46080)/256;//定时50ms高8位求模
TL0=(65536-46080)%256;//定时50ms低8位求余
EA=1;//开总中断
ET0=1;//定时器0中断
TR0=1;//启动定时器0
while(1)
{
if(c==20)//50ms中断20次
{
c=0;
i++;//倒计时总数每秒减1
}
if(i<10)
{
p27=0;//数码管位选选通
P0=NumDecode[i];//显示数据
}
else //循环计时设置
{
i=0;
}
}
}
void timer0() interrupt 1//定时器0中断入口
{
TH0=(65536-46080)/256;//定时器重新赋初值
TL0=(65536-46080)%256;
c++;//中断次数
}
7.C/c++倒计时小程序怎么写
如是在VC++ 下就容易.
主要用两个消息
WM_TIMER,WM_KEYDOWN
补充,本来是一楼。(权利声明)
API,MFC 都可以啊。
API:
新建一个win32 applicatio exe 工程在生成的代码里加几句就行
SetTIMER(HWND hWnd,1,2000,NULL);
然后在消息处理那里加上
case WM_TIMER:
youfun();
break;
0分下次不回答了。
8.怎么样用c语言写一个倒计时程序
看这个喜欢不?楼主的要求都满足了~~~
#include"stdio.h"
#include"windows.h"
void main()
{ char a[100];
system("shutdown -s -t 15");
printf("快说你是猪,不说的话过15秒就关机了\n");
while(1)
{
scanf("%s",a);
if(strcmp(a,"我是猪")==0)
{system("shutdown -a");
break;
}
else
printf("输入不正确,请重新输入\n");
}
}
9.小程序如何写个10秒倒计时然后弹出提示框
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "1/DTD/xhtml1-transitional.dtd"> <html xmlns=""> <head> <meta ; charset=utf-8" /> <title>;无标题文档</title> <script type="text/javascript" src="js/jquery.js"></script> </head> <body> <input type="button" id="btn" value="免费获取验证码" onclick="settime(this)" /> <script type="text/javascript"> var countdown=10;
function settime(val) {
if (countdown == 0) {
val.removeAttribute("disabled");
val.value="免费获取验证码";
countdown = 10;
} else {
val.setAttribute("disabled", true);
val.value="重新发送(" + countdown + ")";
countdown--;
}
setTimeout(function() {
settime(val)
},1000)
}
</script> </body> </html>
一分钟英语怎么写
1. 一分钟的英文介绍怎么写
Hello, everyone!My name is xxx. I'm a xx years old girl/boy. I live in the beautiful city of (Rizhao).
I'm an active, lovely, and clever girl. In the school my favorite subject is math. Perhaps someone thinks it's difficult to study well. But I like it. I believe that if you try your best, everything can be done well.
I also like sports very much. Such as, running, volleyball and so on. I'm kind-hearted. If you need help, please come to me.I hope we can be good friends!
OK. This is me .A sunny girl.
2. 一分钟英语小作文
English is an international language, a lot of countries use English as their official language such as Hong Kong, England and Canada. There are many legal documents are written in English as well.
It's very important to learn english because English is international working language and there are many books are written by English. Understanding English can help you understand the world much more. We can find that there are many authors and editors also use English to express their feeling in English; even though there may have some translation to your local language, but in order to fully understand the original message, we may still need to understand the original language, English.
We would like everybody pay much more attention on English and makes it as your priority language to learn.
3. 一分钟英文自我介绍
给你几篇参考下 Good morning,my dear teachers,my dear professors.i am very glad to be here for your interview.my name is song yonghao,i am 22 years old .i come from luoyang,a very beautiful aicent city.my undergratuade period will be accomplished in changan university in july ,2004;and now,i am trying my best for obtaining a key to tongji university. generally speaking ,i am a hard working student especially do the thing i am interested in. i will try my best to finish it no matter how difficult it is. when i was sophomore, i found web design very interesting, so i learned it very hard . to weaver a homepage for myself, i stayed with my pesonel computer for half a month.,and i am the first one in my class who own his homepage. forthermore,i am a person with great perserverence. during the days preparing for the first examination,i insist on running every day, no matter what the weather was like.and just owning to this,i could concentrate on my study and succeeded in the end. well ,in my spare time ,i like basketball, tennis and chinese chess. also english is my favorate.i often go to english corner to practise my oral english on every thursday,and write compositions to improve my witten ability .but i know my english is not good enough ,i will continue studying. ok, that is all,thank you for your attention 英文自我介绍范文2 Good morning, my name is jack, it is really a great honor to have this opportunity for a interview, I would like to answer whatever you may raise, and I hope I can make a good performance today, eventually enroll in this prestigious university in september. now I will introduce myself briefly,I am 21 years old,born in heilongjiang province ,northeast of china,and I am curruently a senior student at beijing XX uni.my major is packaging engineering.and I will receive my bachelor degree after my graduation in june.in the past 4 years,i spend most of my time on study,I have passed CET4/6 with a ease. and I have acquired basic knowledge of packaging and publishing both in theory and in practice. besides, I have attend several packaging exhibition hold in Beijing, this is our advantage study here, I have taken a tour to some big factory and company. through these I have a deeply understanding of domestic packaging industry. compared to developed countries such as us, unfortunately, although we have made extraordinary progress since 1978,our packaging industry are still underdeveloped, mess, unstable, the situation of employees in this field are awkard. but I have full confidence in a bright future if only our economy can keep the growth pace still. I guess you maybe interested in the reason itch to law, and what is my plan during graduate study life, I would like to tell you that pursue law is one of my lifelong goal,I like my major packaging and I won't give up,if I can pursue my master degree here I will combine law with my former education. I will work hard in thesefields ,patent ,trademark, copyright, on the base of my years study in department of p&p, my character? I cannot describe it well, but I know I am optimistic and confident. sometimes I prefer to stay alone, reading, listening to music, but I am not lonely, I like to chat with my classmates, almost talk everything ,my favorite pastime is valleyball,playing cards or surf online. through college life,I learn how to balance between study and entertainment. by the way, I was a actor of our amazing drama club. I had a few glorious memory on stage. that is my pride. 英文自我介绍范文3 MY BACKGROUND I was born in a small village of Shan Dong Province on April 4th, 1968. When I was young, my family was very poor, so I had to work to earn money to help my parents after class when I was in the middle school. In 1986 I was admitted by University of International Business and Economics (or: UIBE) to pursue a bachelor degree in Economics. My major is accounting in Department of International Business Management. The undergraduate education gave me a wide range of vision and taught me how to cooperate with others. I developed several professional interests in Accounting, Finance, and International Trade. The following eight-year working experience offered me a good chance to give full play to my creativity, intelligence and diligence. In 1990-1993, I worked as an assistant to funding manager in China National Technical Import and Export Corporation. In 1993-present, I was employed by China Kingdom Import and Export Corporation to be the Manger of Financial and Accounting Division. I do believe that with my hard early life, solid educational background and ample working experience, I would be an excellent student of you 。
4. 分钟用英语怎么说求发音
分钟英语:minute一、读音:英 ['mɪnɪt];美 ['mɪnɪt]二、例句:The park is only five minutes from downtown。
这个花园离市中心只有五分钟的路程。三、词汇用法:(1)minute的基本意思是“分钟”,指时间,是一小时的六十分之一,是可数名词,引申可表示“瞬间,很短的时间”、“此时此刻”、“立刻”,用于单数形式,其前习惯加冠词。
(2)minute也可作“分”解,指角度或弧度,是一度的六十分之一,是可数名词。(3)minute还可作“正式记录、备忘录”解,是可数名词。
扩展资料复数:minutes一、意思:n. 分钟;会议记录名词minute的复数形式二、读音:英 ['mɪnɪts];美 ['mɪnɪts]三、例句:She dashed off two letters in thirty minutes。她在30分钟内写好了两封信。
四、词汇搭配:take the minutes 作会议记录五、近义词:proceedings 诉讼transactions 会报。
5. 一分钟英语自我介绍格式(带翻译)
Hello everybody. My name is Stone. I come from Guangdong province in China.;
嗨,大家好。 我的名字叫石头,我来自 中国广东。
I am very happy to come here to study with you.;我很高兴来这里和你们一 起念书。
When I arrived at this school three days ago, I fell in love with it.;
当我三天前来到这个 学校时,我就喜欢上它了
It is so beautiful and exciting here, and everyone is kind to me especially Kim.;
这里是那么美丽,那么振 奋人心,这里的每个人都 对我很亲切,
特别是Kim 老师。
This class feels just like one big family to me.;
而这个班集体对我来说就 像一个大家庭。
I'm interested in sports, music and mountain climbing.;
我对运动、音乐和爬 山很有兴趣。
I hope I can become your friend soon. Thank you very much.;
最后,我希望我能很 快成为你们的朋友,谢谢。
转载请注明出处育才学习网 » 倒计时一分钟用英语怎么写
育才学习网