我作为一个还在学习的小白,祝各位前辈 1024不加班,享清福
if ((test.equals("加班")) {
try {
throw new Exception();
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
System.out.println("加班?不存在的");
}
}
程序员的节日祝大家没有bug,永不脱发吧
if (LocalDateTime.now().isEqual(LocalDateTime.parse("2021-10-24 00:00:00",DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))) {
System.out.println("过节当然要奖励一下自己,来一天无代码日,保护一下头发啦");
}
from turtle import *
color("black", "red")
begin_fill()
left(50)
forward(100)
circle(40, 180)
left(260)
circle(40, 180)
forward(100)
end_fill()
done()
完全不过节~~~画个爱心路过吧
又到了一年的1024程序员节啦,去年自己收获了 CSDN 博客之星 Top 40 的荣誉称号,今年想要点实在的,请看下面的代码,看懂的欢迎回复支持!
echo "I "
printf("want ");
console.log("a ")
cout<<"new "<<endl;
system.out.println("object");
document.write('hahaha,1。0。2。4。');
祝福所有的程序员节日快乐!!
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#define N 100
int main()
{
FILE *fp1,*fp2;
int x;
char str[N];
fp1=fopen("CName.txt","a+"); //写入被祝福者名字的.txt文件
fp2=fopen("Happy.txt","a+"); //写入祝福语.txt文件
if(fp1==0||fp2==0)
{
printf("Error!\n");
exit(1);
}
printf("请输入姓名:\n");
gets(str);
while(strcmp(str,"$")!=0) //输入被祝福者的名字;直到读入$为止
{
fputs(str,fp1);
fputc('\n',fp1);
gets(str);
}
rewind(fp1);
srand(time(NULL));
while(fgets(str,N,fp1)!=NULL)
{
fprintf(fp2,"Dear "); //亲爱的 XXX:
fputs(str,fp2);
x=1+rand()%3; //随机摇取祝福语;
printf("%d",x);
switch(x)
{
case 1:fprintf(fp2,":希望事事顺心,每天都元气满满,凡是想做的都能做好,哈哈哈,每天快乐鸭。\n");break;
case 2:fprintf(fp2,":祝你在接下来心想事成,一切都好叭,每天都精力充沛\n");break;
case 3:fprintf(fp2,":1024节日快乐\n");break;
}
}
fclose(fp1);
fclose(fp2);
system("pause");
return 0;
}
class First
{
public First() { System.out.println("2021 - 1 - 996 = 1024"); }
}
class Second extends First
{
public Second() { System.out.println("祝大家告别单身,远离996"); }
}
class Third extends Second
{
public Third() { System.out.println("1024节日快乐"); }
}
public class MainClass
{
public static void main(String[] args)
{
Third c = new Third();
}
}