效果图制作day1

CAD导出结构

  • W写块 - 将新建墙体结构图保存为单独文件

导入图纸

  • 导入结构dwg 图纸
  • 修改图纸, 包管道 - 门窗结构 - 放置门和修改窗户尺寸 - 修改梁体墙体等 - 绘制弧形墙体 - 地面铺装(材质连续) - 自由造型(地台制作) - 吊顶设计 - 自由造型导入立面cad 文件(客餐厅、隐形门、格栅等 材质-突出厚度-分解组) - 格栅制作时厚度形成高低错落后进行阵列
### 万年历编程代码及实现方式 以下是使用C++实现一个简单、实用的万年历程序的代码示例,该程序可以显示任意年月的月历,并按每行两个月的格式输出指定年的年历[^1]。 ```cpp #include <iostream> #include <iomanip> #include <cmath> using namespace std; // 判断是否为闰年 bool isLeapYear(int year) { return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); } // 计算某年某月1日是星期几 int getDayOfWeek(int year, int month) { if (month == 1 || month == 2) { year--; month += 12; } return (year + year / 4 - year / 100 + year / 400 + (13 * month + 8) / 5) % 7; } // 打印月历头部 void printMonthHeader(int month, int year) { cout << setw(20) << left << " " << setw(10) << left << " " << month << "月" << year << endl; cout << setw(5) << "日" << setw(5) << "一" << setw(5) << "二" << setw(5) << "三" << setw(5) << "四" << setw(5) << "五" << setw(5) << "六" << endl; } // 打印月历主体 void printMonthBody(int year, int month) { int daysInMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; if (isLeapYear(year)) daysInMonth[1] = 29; int startDay = getDayOfWeek(year, month); int totalDays = daysInMonth[month - 1]; // 输出空格对齐 for (int i = 0; i < startDay; i++) { cout << setw(5) << " "; } // 输出日期 for (int day = 1; day <= totalDays; day++) { cout << setw(5) << day; if ((day + startDay) % 7 == 0) { cout << endl; } } cout << endl; } // 打印年历 void printYearCalendar(int year) { for (int i = 0; i < 6; i++) { for (int j = 0; j < 2; j++) { int month = i * 2 + j + 1; if (month > 12) break; printMonthHeader(month, year); printMonthBody(year, month); } cout << endl; } } int main() { int year; cout << "请输入年份: "; cin >> year; printYearCalendar(year); return 0; } ``` #### 效果图示例 假设输入年份为2023,程序将按以下格式输出: ``` 1月2023 日 一 二 三 四 五 六 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2月2023 日 一 二 三 四 五 六 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ... ``` 此代码实现了基本的万年历功能,包括闰年判断、星期计算以及月份天数的确定。通过命令行界面展示日历,用户可以直观地查看指定年份的完整日历信息[^1]。 此外,对于更复杂的实现需求(如GUI界面或嵌入式系统中的万年历设计),可以参考单片机设计中的硬件与软件结合方案[^4],或者利用Java内置的`Calendar`类和`LocalDate`类来进一步优化算法逻辑[^3]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MaxLoongLvs

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值