#include <stdlib.h>
#include <time.h>
#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")
}
}
祝盯带你成功
我会!我现在就姿差亮去写你等着啊别选别人的答案啊
我可是女生喔
我回来了可是我写成C语言了
#include<stdio.h>
int main()
{
char ch
printf("请美女选择:你是美女吗?\n")
printf("A.是 B.不是\n")
scanf("%c",&ch)
switch (ch)
{
case 'A':
printf("恭喜你美女,你最最喜欢你的男朋友谁谁谁(你的名字,昵称什么的)")
break
case 'B':
printf("胡说,你明明就是美女。你的男朋友就是最最爱迹宽你的,最最温柔可爱的,英俊到惨绝人寰的某某某(你的名字)")
break
}
}
这里没有缩进的庆梁很整齐,你自己调调看
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)