模拟飞行呼号生成器(HTML)

感谢大家支持,有什么问题issue给我(:

PS:楼主是计算机大一,没开始学专业课,是用cursor生成的,但我会尽己所能改进这个项目

SINO6427/-FlightCallSignGenerator: 生成模拟飞行航班号(ICAO)

我也做了个呼号生成器

echo "$(read)$(shuf -i 1-9999 -n 1)"

好巧,我用一行python做了个同样逻辑的,三字码还能用户来输

import random; print((c if len(c:=input('ICAO: ').strip().upper())==3 and c.isalpha() else (_ for _ in ()).throw(ValueError('ICAO must be 3 letters'))) + (f'{(n:=random.randint(1,9999)):04d}' if input('Leading zeros? [y/N]: ').strip().lower() in {'y','yes','1','true'} else str(n:=random.randint(1,9999))))

还有CPP版

#include<bits/stdc++.h>
int main(int i){std::string a;char b;std::cin>>a>>b;srand(time(0));i=rand()%9999+1;std::cout<<a.substr(0,3)<<std::setfill('0')<<std::setw(b=='y'?4:0)<<i;}

哈哈哈,大佬就是厉害,一行代码就解决了):

你别说我也做了