你好!
我是一个一个刚(不)满12的小苟蚌,玩猫和老登,崩坏·星穹铁道。也玩的私聊我哈。
猫和老鼠CH真是苟,删了牢糕,手法大帝剑杰真是太有实力了,我们牢猫根本玩不了一点。
对了,额外送粉丝们一个好东西:
#include<bits/stdc++.h>
#include<windows.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
using namespace std;
void S(int ForgC, int BackC) {
WORD wColor = ((BackC & 0x0F) << 4) + (ForgC & 0x0F);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wColor);
}
void G(int x,int y){
COORD pos={x,y};
HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOut,pos);
return ;
}
bool func(int x){
return (x%4==0&&x%100!=0)||x%400==0;
}
void HC(){
CONSOLE_CURSOR_INFO cur={1,0};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cur);
}
void SC(){
CONSOLE_CURSOR_INFO cur={1,1};
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cur);
}
int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int func2(int x,int y){
if(func(x)&&y==2)return 29;
return m[y];
}
int main(){
HC();
int n,y,r,shi,fen,miao,day=0,m=1;
time_t rawtime;
struct tm*timeinfo;
time(&rawtime);
timeinfo=localtime(&rawtime);
n=1900+timeinfo->tm_year;
y=1+timeinfo->tm_mon;
r=timeinfo->tm_mday;
shi=timeinfo->tm_hour;
fen=timeinfo->tm_min;
miao=timeinfo->tm_sec;
for(int i=1900;i<=n;i++){
for(int j=1;j<=(i<=n-1?12:y);j++){
for(int k=1;k<=(i==n&&j==y?0:func2(i,j));k++){
day++;
if(day==8)day=1;
}
}
}
day++;
if(day==8)day=1;
while(true){
m=1;
time_t rawtime;
struct tm*timeinfo;
time(&rawtime);
timeinfo=localtime(&rawtime);
n=1900+timeinfo->tm_year;
y=1+timeinfo->tm_mon;
r=timeinfo->tm_mday;
shi=timeinfo->tm_hour;
fen=timeinfo->tm_min;
miao=timeinfo->tm_sec;
printf("%6d-%3d-%3d-%3d-%3d-%3d\n",n,y,r,shi,fen,miao);
cout<<"Sun Mon Tue Wed Thu Fri Sat"<<endl;
for(int i=1;i<=day%7;i++)cout<<" ";
for(int i=day%7+1;i<=7;i++){
if(m==r){
S(12,0);
printf("%3d",m);
S(15,0);
cout<<" ";
}else if(m<=r){
S(10,0);
printf("%3d",m);
S(15,0);
cout<<" ";
}else{
printf("%3d",m);
cout<<" ";
}
m++;
}
cout<<endl;
while(m<=func2(n,y)){
for(int i=1;i<=7;i++){
if(m==r){
S(12,0);
printf("%3d",m);
S(15,0);
cout<<" ";
}else if(m<=r){
S(10,0);
printf("%3d",m);
S(15,0);
cout<<" ";
}else if(m<=func2(n,y)){
printf("%3d",m);
cout<<" ";
}else break;
m++;
}
cout<<endl;
}
Sleep(5);
G(0,0);
}
return 0;
}
你的蒟蒻
2024.7.30