#include<iostream>
#include<fstream>
using namespace std;
void main() //程序从这里开始运行
{
int day; ofstream fout("D:\jixingkebiao.ics"); //基本内容输入
fout << "BEGIN:VCALENDAR" << endl;
fout << "PRODID:-//Google Inc//Google Calendar 70.9054//EN" << endl;
fout << "VERSION:2.0" << endl;
fout << "CALSCALE:GREGORIAN" << endl;
fout << "METHOD:PUBLISH" << endl;
fout << "X-WR-CALNAME:课程表" << endl;
fout << "X-WR-TIMEZONE:Asia/Shanghai" << endl; //输入英语课表
for (int t = ; t < ; t++)
{
day = ;
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T000000Z" << endl;
fout << "DTEND:2018030" << day << "T013500Z" << endl;
fout << "LOCATION:北综楼 111/胡冬梅" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180604T155959Z" << endl;
}
else
{
fout << "DTSTART:2018030" << day + << "T020500Z" << endl;
fout << "DTEND:2018030" << day + << "T034000Z" << endl;
fout << "LOCATION:北综楼 111/胡冬梅" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180607T155959Z" << endl;
} fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:大学英语" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入数字逻辑课表
for (int t = ; t < ; t++)
{
day = ;
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T020500Z" << endl;
fout << "DTEND:2018030" << day << "T034000Z" << endl;
fout << "LOCATION:综合楼303/墙威" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180507T155959Z" << endl;
}
else { fout << "DTSTART:2018030" << day + << "T060000Z" << endl;
fout << "DTEND:2018030" << day + << "T073500Z" << endl;
fout << "LOCATION:综合楼408/墙威" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180509T155959Z" << endl; } fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:数字逻辑" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入高等数学课表
day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T060000Z" << endl;
fout << "DTEND:2018030" << day << "T073500Z" << endl;
fout << "LOCATION:综合楼303/李少华" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180702T155959Z" << endl;
}
else if (t == )
{
fout << "DTSTART:2018030" << day + << "T000000Z" << endl;
fout << "DTEND:2018030" << day + << "T013500Z" << endl;
fout << "LOCATION:综合楼304/李少华" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180704T155959Z" << endl;
}
else if (t == )
{
fout << "DTSTART:2018030" << day + << "T060000Z" << endl;
fout << "DTEND:2018030" << day + << "T073500Z" << endl;
fout << "LOCATION:综合楼207/李少华" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180706T155959Z" << endl;
}
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:高等数学" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入电工与电子技术课表 day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T000000Z" << endl;
fout << "DTEND:2018030" << day << "T013500Z" << endl;
fout << "LOCATION:综合楼307/胡志敏" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180508T155959Z" << endl;
}
else
{ fout << "DTSTART:2018030" << day + << "T000000Z" << endl;
fout << "DTEND:2018030" << day + << "T013500Z" << endl;
fout << "LOCATION:综合楼111/胡志敏" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180510T155959Z" << endl; } fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:电工与电子技术" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
} //输入离散数学课表 day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) {
fout << "DTSTART:2018040" << day << "T060000Z" << endl;
fout << "DTEND:2018040" << day << "T073500Z" << endl;
fout << "LOCATION:教一楼503/吴亦奇" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180703T155959Z" << endl;
}
else
{
fout << "DTSTART:2018040" << day + << "T000000Z" << endl;
fout << "DTEND:2018040" << day + << "T013500Z" << endl;
fout << "DESCRIPTION:" << endl;
fout << "LOCATION:教一楼404/吴亦奇" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180706T155959Z" << endl; }
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:离散数学" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入地球科学概论课表 day = ; for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:2018030" << day << "T110000Z" << endl;
fout << "DTEND:2018030" << day << "T123500Z" << endl;
fout << "LOCATION:综合楼410/任利民" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180424T155959Z" << endl;
}
else
{
fout << "DTSTART:2018030" << day + << "T110000Z" << endl;
fout << "DTEND:2018030" << day + << "T123500Z" << endl;
fout << "LOCATION:综合楼106/任利民" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180426T155959Z" << endl;
} fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:地球科学概论" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
}
//输入体育课课表 day = ; fout << "BEGIN:VEVENT" << endl; fout << "DTSTART:2018030" << day << "T020500Z" << endl;
fout << "DTEND:2018030" << day << "T034000Z" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180704T155959Z" << endl;
fout << "LOCATION:北区体育馆/袁春梅" << endl;
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:乒乓球初级班" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl; //输入高级软件编程技术课表 day = ;
for (int t = ; t < ; t++)
{
fout << "BEGIN:VEVENT" << endl;
if (t == ) { fout << "DTSTART:201805" << day << "T060000Z" << endl;
fout << "DTEND:201805" << day << "T073500Z" << endl;
fout << "LOCATION:教一楼408/熊慕舟" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180627T155959Z" << endl;
}
else
{
fout << "DTSTART:201805" << day + << "T020500Z" << endl;
fout << "DTEND:201805" << day + << "T034000Z" << endl;
fout << "LOCATION:教一楼408/熊慕舟" << endl;
fout << "RRULE:FREQ=WEEKLY;UNTIL=20180627T155959Z" << endl;
}
fout << "DESCRIPTION:" << endl;
fout << "SEQUENCE:0" << endl;
fout << "STATUS:CONFIRMED" << endl;
fout << "SUMMARY:高级软件编程技术" << endl;
fout << "TRANSP:OPAQUE" << endl;
fout << "END:VEVENT" << endl;
} fout << "END:VCALENDAR";
fout.close(); return; }

C++编写谷歌日历的更多相关文章

  1. Ubuntu 中使用 谷歌日历

    简介 对于经常使用待办类软件的人来说,谷歌日历是个不错的选择.但每次,都要登录网页去查看,对于我这样的懒人来说似乎麻烦了些. 所以在网上找了个叫做 Calendar Indicator 的软件. 效果 ...

  2. c语言编写的日历

    输入年份如2013,显示2013年的日历. 思路: 1.查找每个月1号是星期几(这里利用了1990年1月1号是星期一) 计算年份如2013年1月1号到1990年1月1号有Days天,Day%7得到星期 ...

  3. html编写的日历

    1.html (1) <html> <head> <meta http-equiv="Content-Type" content="text ...

  4. Java编写的日历,输入年月,输出这个月的日期与星期

    import java.util.Scanner; public class rili { public static void main(String[] args) { for (int g = ...

  5. java编写本月日历

    代码如下: import java.time.*; public class Main { public static void main(String arg[]){ LocalDate date ...

  6. 用JS编写日历的简单思路

    提要:本文以写当前时间环境下当月的日历表为例,用最简单的方法实现JavaScript日历,旨在展示JS世界中实用为本.简单为上的解决问题的思路. Web页中的日历一般离不开表格,通常都使用表格装载指定 ...

  7. 日历组件 原生js

    自己基于原生js编写的日历组件 git地址: https://github.com/lihefen/calendar.git demo : https://lihefen.github.io/cale ...

  8. Google Calendar(日历)设置农历生日提醒

    Generate birthday dates base on lunar birthdays for google calendar import Can be used for notifying ...

  9. 调用Android自带日历功能(日历列表单、添加一个日历事件)

    调用Android自带日历功能  觉得这篇文章不错,转载过来. 转载:http://blog.csdn.net/djy1992/article/details/9948393 Android手机配备有 ...

随机推荐

  1. tiny4412 裸机程序 六、重定位代码到IRAM+0x8000【转】

    本文转载自:http://blog.csdn.net/eshing/article/details/37115697 一.重定向 对于程序而言,我们需要理解两个概念,一是程序当前所处的地址,即程序在运 ...

  2. canvas上的像素操作(图像复制,细调)

    canvas上的像素操作(图像复制,细调) 总结 1.操作对象:ImageData 对象,其实是canvas的像素点集合 2.主要操作: var obj=ctx.getImageData(0,0,10 ...

  3. XAML实例教程系列 - 命名空间(NameSpace) 三

    XAML实例教程系列 - 命名空间(NameSpace) 2012-05-28 14:14 by jv9, 2205 阅读, 10 评论, 收藏, 编辑 上一篇曾提及XAML中,每个对象元素的声明是对 ...

  4. poj3469 Dual Core CPU——最小割

    题目:http://poj.org/problem?id=3469 最小割水题(竟然没能1A): 代码如下: #include<iostream> #include<cstdio&g ...

  5. fprintf与stderr、stdout的使用

    #include <stdio.h> void main() { fprintf(stderr,"soyo8888!"); fprintf(stdout,"s ...

  6. HTTP缓存控制 总结

    一.HTTP响应头.请求头中与缓存控制的相关字段 二.一个页面访问缓存的流程 三.三种刷新的实际操作 四.如何设置缓存 一.HTTP响应头.请求头中与缓存控制的相关字段 浏览器向服务器发起请求后,服务 ...

  7. Vue解决移动端localhost无数据问题

    正常web端调用后台接口时使用localhost或者ip都能访问后台数据,但是在移动端上使用localhost却无法访问后台数据 这时候需要把localhost改成ip就可以在移动端上访问后台数据了

  8. 【BZOJ1124】[POI2008]枪战Maf(基环树_构造)

    被教练勒令做题不能看题解后的第一道新题,自行 yy 了好久终于 AC 了(菜啊)--写博客纪念. 题目: BZOJ1124 分析: 考虑每个人向他要打的人连边.根据题意,所有点都有且只有一条出边.那么 ...

  9. websocket的原理

    首先明确几点: 1. websocket是一种协议.是html5的一种新协议: 2. 与http的区别是,它是一种双向通信协议,服务器和客户端都能主动向对方发送或接受数据: 3. websocket需 ...

  10. 实现strcpy

    #include <stddef.h> char* strcpy(char* dest, const char* src) { if (dest == NULL || src == NUL ...