本人急需一个用C语言编写的C程序。请大家帮忙了。复制的也可以,网上下的也可以,能编译,运行就好了。谢了。还有问题请留言!!!谁能帮忙不胜感激!
运行的环境VC++6.0
c语言怎么样编写一个时钟程序
c语言时钟程序代码如下:include<windows.h> include<math.h> define ID_TIMER 1\/\/计时器ID define TWOPI (2*3.14159)LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR szCmdLine,int iCmdShow){ static TCHAR szAppName[]=TEXT...
求一个关于用C语言编写的电子时钟的程序,内容要有闹钟,可以调整时间
uchar data CLOCK[4]={0,0,0,12};\/\/存放时钟时间(百分秒,秒,分,和时位)\/\/数码管显示表0-f 灭 uchar code TABLE[]={0xBE,0x06,0xEA,0x6E,0x56,0x7C,0xFC,0x0E,0xFE,0x7E,0x00};\/\/ \/\/模拟串口发送一个字节数据 函数 \/\/ void SendData(unsigned char senddata){ unsigned ...
单片机C语言该怎么编写时钟程序?
这个是简单的数码管时钟显示如果有需要,我写过比较完善的1602显示时钟.显示控制年月日等等.#include<reg51.h> sbit Begin=P2^0;sbit Hour=P2^1;sbit Mus=P2^2;sbit End=P2^3;unsigned char code Tab[]={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x...
用c语言编一个时钟程序实现时分秒计时功能
include int main(){ time_t t1,t2;struct tm *ptm;char timestr[128]={'\\0'};time(&t1);while(1){ time(&t2);if(difftime(t2,t1)>=1){ system("cls");ptm=localtime(&t2);strftime(timestr,128,"%H:%M:%S",ptm);printf("%s\\n",timestr);t1=t2;} } system("PAUSE");r...
怎么用C语言编程数字时钟
&graphmode,"C:\\\\TC2"); \/\/初始化VGA屏幕模式setbkcolor(BLACK); \/\/使用黑色的背景色while(!kbhit(0)) \/\/若有键盘输入,则跳出,即是结束程序{ setcolor(GREEN); \/\/把画笔设为绿色circle(mid_x,mid_y,180); \/\/钟的外圆circle(mid_x,mid_y,150); \/\/钟的内圆circle(mid_x,mid_y,...
谁能帮我编一个C语言时钟啊
\/*这是我做了一半的万年历的界面,正好有你需要的显示时钟的功能,你把它分离出来吧*\/ include<stdio.h> include<windows.h> include int week; \/\/用于存放星期几的变量 \/***定义结构体存时间数据***\/ int year,month,day,hour,min,sec; \/\/当前时间 int l_year,l_month,l_day,l_...
C语言程序设计题:模拟时钟转动的程序,怎么做?
turbo c 2.0模拟时钟转动程序代码*\/ #include"graphics.h" #include"math.h" #include"dos.h" #define pi 3.1415926 #define X(a,b,c) x=a*cos(b*c*pi\/180-pi\/2)+300 #define Y(a,b,c) y=a*sin(b*c*pi\/180-pi\/2)+240 #define d(a,b,c) X(a,b,c);Y(...
用C语言编数码管时钟程序
\/\/G, F A E B H C D sbit l1=P2^7;sbit l2=P2^6;sbit l3=P2^5;sbit l4=P2^4;sbit l5=P2^3;sbit l6=P2^2;sbit l7=P2^1;sbit l8=P2^0;sbit j1=P1^1;sbit j2=P1^2;unsigned char code ledcode[]={0x84,0xf5,0x46,0x54,0x35,0x1c,0x0c,0xd5...
c语言 倒计时时钟程序
include <windows.h> include <conio.h> void main(){ long int t;int flag =0;t = 86400;printf("press S start, press E stop\\n");while(1){ if (kbhit() == 'S' || kbhit() == 's') flag =1;if (kbhit() == 'E' || kbhit() == 'e') flag =0;Sleep(1000);i...
单片机时钟程序 24小时制
C语言的:include <reg51.h> include<stdio.h> unsigned char ledbuf[8];code unsigned char ledmap[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99,0x92, 0x82, 0xf8, 0x80, 0x90}; \/\/8段显示 void delay(unsigned char cnt){ unsigned char i;while(cnt--!=0)for(i=100;i!=0;i-...