制作一个时钟显示程序

《功能要求1、时钟由表盘、秒针、分针、时针、。2)时间指示当前系统时间。3)按任意键退出这是计算机课程设计报告,报告要求1)所采用语言的理由。2)开发环境的介绍和特点。3... 《功能要求1、时钟由表盘、秒针、分针、时针、。2)时间指示当前系统时间。3)按任意键退出

这是计算机课程设计报告,报告要求1)所采用语言的理由。2)开发环境的介绍和特点。3)设计过程和理论根据4)编程的流程图和主要函数的说明。5)每个题目的结果。6)课程设计总结和程序的调式心得
展开
 我来答
林水科技
2011-06-24 · 超过13用户采纳过TA的回答
知道答主
回答量:95
采纳率:0%
帮助的人:25.9万
展开全部
脚本说明:
第一步:把如下代码加入<body>区域中
<SCRIPT language=javascript>
var dot=65
rads=new Array(65)
function rad () {
for (i=1; i<dot; i++) {
if (document.all) rads[i]=new Array (eval('rad'+i).style,-100,-100)
else rads[i] = new Array (eval('document.rad'+i),-100,-100)
}
}

function setCircle() {
for (i=1; i<dot; i++) {
rads[i][0].left=rads[i][1]+pX-15
if (document.layers) rads[i][0].left+=10
rads[i][0].top=rads[i][2]+pY-20
//if (document.layers) rads[i][0].top-=5

}
}

function counter() {
for (i=1; i<dot; i++) {
rad=Math.PI*(i/((dot-1)/2))
rads[i][1] = Math.sin(rad)*60;
rads[i][2] = -Math.cos(rad)*60;
}
setCircle()
}

pX=400;pY=150
obs = new Array(13)
function ob () {
for (i=0; i<13; i++) {
if (document.all) obs[i]=new Array (eval('ob'+i).style,-100,-100)
else obs[i] = new Array (eval('document.ob'+i),-100,-100)
}
}
function cl(a,b,c){
if (document.all) {
if (a!=0) b+=-1
eval('c'+a+'.style.pixelTop='+(pY+(c-5)))
eval('c'+a+'.style.pixelLeft='+(pX+(b)))
}
else{
if (a!=0) b+=10
eval('document.c'+a+'.top='+(pY+(c)))
eval('document.c'+a+'.left='+(pX+(b)))
}
}

function runClock() {
for (i=0; i<13; i++) {
obs[i][0].left=obs[i][1]+pX
obs[i][0].top=obs[i][2]+pY
}
}

var lastsec
function timer() {
time = new Date ()
sec = time.getSeconds()
if (sec!=lastsec) {

lastsec = sec
sec=Math.PI*sec/30
min=Math.PI*time.getMinutes()/30
hr =Math.PI*((time.getHours()*60)+time.getMinutes())/360
for (i=1;i<6;i++) {
obs[i][1] = Math.sin(sec) * (44 - (i-1)*11)-16;
if (document.layers)obs[i][1]+=10;
obs[i][2] = -Math.cos(sec) * (44 - (i-1)*11)-27;
}
for (i=6;i<10;i++) {
obs[i][1] = Math.sin(min) * (40 - (i-6)*10)-16;
if (document.layers)obs[i][1]+=10;
obs[i][2] = -Math.cos(min) * (40 - (i-6)*10)-27;
}
for (i=10;i<13;i++) {
obs[i][1] = Math.sin(hr) * (37 - (i-10)*11)-16;
if (document.layers)obs[i][1]+=10;
obs[i][2] = -Math.cos(hr) * (37 - (i-10)*11)-27;
}
}

}
function setNum(){
cl (0,-67,-65);
cl (1,10,-51);
cl (2,28,-33);
cl (3,35,-8);
cl (4,28,17);
cl (5,10,35);
cl (6,-15,42);
cl (7,-40,35);
cl (8,-58,17);
cl (9,-65,-8);
cl (10,-58,-33);
cl (11,-40,-51);
cl (12,-16,-56);

}
</SCRIPT>

<DIV id=c0
style="HEIGHT: 128px; LEFT: 38px; POSITION: absolute; TOP: -119px; WIDTH: 686px; Z-INDEX: 2"></DIV>
<DIV id=c1
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>1</B>
</DIV>
<DIV id=c2
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>2</B>
</DIV>
<DIV id=c3
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>3</B>
</DIV>
<DIV id=c4
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>4</B>
</DIV>
<DIV id=c5
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>5</B>
</DIV>
<DIV id=c6
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>6</B>
</DIV>
<DIV id=c7
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>7</B>
</DIV>
<DIV id=c8
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>8</B>
</DIV>
<DIV id=c9
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>9</B>
</DIV>
<DIV id=c10
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>10</B>
</DIV>
<DIV id=c11
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>11</B>
</DIV>
<DIV id=c12
style="FONT-SIZE: 11px; LEFT: 20px; POSITION: absolute; TOP: -20px; Z-INDEX: 5"><B>12</B>
</DIV>
<DIV id=ob0 style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 1">
</DIV>
<DIV id=ob1
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#0000ff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob2
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#0000ff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob3
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#0000ff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob4
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#0000ff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob5
style="HEIGHT: 32px; LEFT: -35px; POSITION: absolute; TOP: -4px; WIDTH: 742px; Z-INDEX: 8"><FONT
color=#0000ff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob6
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#00ffff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob7
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#00ffff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob8
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#00ffff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob9
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#00ffff size=+3><B>.</B></FONT> </DIV>
<DIV id=ob10
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 6"><FONT
color=#ff0000 size=+3><B>.</B></FONT> </DIV>
<DIV id=ob11
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 6"><FONT
color=#ff0000 size=+3><B>.</B></FONT> </DIV>
<DIV id=ob12
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 6"><FONT
color=#ff0000 size=+3><B>.</B></FONT> </DIV>
<DIV id=rad0 style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 1">
</DIV>
<DIV id=rad1
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad2
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad3
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad4
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad5
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad6
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad7
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad8
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad9
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad10
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad11
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad12
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad13
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad14
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad15
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad16
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad17
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad18
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad19
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad20
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad21
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad22
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad23
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad24
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad25
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad26
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad27
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad28
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad29
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad30
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad31
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad32
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad33
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad34
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad35
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad36
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad37
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad38
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad39
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad40
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad41
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad42
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad43
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad44
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad45
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad46
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad47
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad48
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad49
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad50
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad51
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad52
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad53
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad54
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad55
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad56
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad57
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad58
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad59
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad60
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad61
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 8"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad62
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad63
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>
<DIV id=rad64
style="LEFT: -20px; POSITION: absolute; TOP: -20px; Z-INDEX: 7"><FONT
color=#000000><B>.</B></FONT> </DIV>

第二步:把<body>中的内容改为:
<body onload="rad();counter();ob();setNum();setInterval('timer()',100);setInterval('runClock()',100)">
您可以登录我们的网站:(网站地址点击我们的百度账号名进入在我们的简介中有网址和我们的联系方式)点击在线客服专员为您指导一下
AiPPT
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图... 点击进入详情页
本回答由AiPPT提供
250cfeoom
2011-06-24 · TA获得超过2557个赞
知道大有可为答主
回答量:4657
采纳率:71%
帮助的人:836万
展开全部
这个啊,很简单一般书上有例题吧
#include "stdafx.h"
#include "time.h"
#include "windows.h"
int main(int argc, char* argv[])
{
int m;
printf("请输入倒计时(单位分)\n");
scanf("%d",&m);
int t=60;
printf("倒计时开始\n");
if(m!=0)
m--;
while(1)
{
if (t==0)
{
m--;
t=t+60;
}
Sleep(1000);
t--;
printf("剩余时间:%d分%d秒\n",m,t);
if (m==0&&t==0)
{
break;
}
}
printf("倒计时结束\n");
return 0;
}
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
焉沛鲆04Y
2011-07-08
知道答主
回答量:17
采纳率:0%
帮助的人:0
展开全部
ecw火狐钓鱼程序,V19。狩猎者V12钓鱼程序出售,烈火最新钓网银,圣之光改版出售。ktq
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式