用C++编个程序送给女朋友

[复制链接]
查看11 | 回复1 | 2015-11-23 16:41:14 | 显示全部楼层 |阅读模式
#include#include#include#include "conio.h"void main() {int year=0,month=0,day=0,hour=0,mintue=0,second=0; printf("Input the day you tell your trues:(Year-Mou-Day-Hour-Min-Sec,default for 0):\n"); scanf("%d-%d-%d-%d-%d-%d",&year,&month,&day,&hour,&mintue,&second); system("cls"); time_t now,trues,toget; while(1) {struct tm truest = {second,mintue,hour,day,month-1,year-1900};now = time(NULL); trues=mktime(&truest); printf("now is %s\n",ctime(&now)); printf("the day you tell your trues:%s\n",ctime(&trues)); toget = (now-trues)/3600/24;
printf("days together:%d\n",toget);
toget = (now-trues)/3600;
printf("hours together:%d\n",toget);
toget = (now-trues)/60;
printf("mintues together:%d\n",toget);toget = (now-trues); printf("seconds together:%d\n",toget); _sleep(1000);
system("cls"); }}祝你成功
回复

使用道具 举报

千问 | 2015-11-23 16:41:14 | 显示全部楼层
为什么不用flash呢?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行