November, 11

 

I can see clearly now (20)

Key vocabulary

1.       seem to be= appears or is(what seems to the problem/matter/trouble)

2.       struggle=try very hard(struggle against difficuilties)

3.       20/20 vision=perfect eyesight

4.       make out= to see(辨别出来)

5.       far sighted=see far-away things more clearly than things nearby

6.       as blind as bat=have really poor vision

7.       vision=ability to see things

8.       blurry=not clear

9.       pick out=choose

10.   prescription=a message written by a doctor that tells people what medicine to take

A: Hello, Arthur. What seems to be the problem?

B: Hey doc. Well, I think I might need glasses. I’m getting headaches, and I really struggle to see things that are far away. But I have always had 20/20 vision.

A: Sounds like you may be far-sighted. Ok, then, cover your left eye and read the chart in front of you.

B: Mmm…X,E,R,3, a question mark, and I can’t quite make out the other symbol but I think it’s the peace sign.

A: Wow, Arthur! You are as blind as bat.

B: Yeah, I know , my vision is really blurry at times.

A: Ok then, head on over to the other room and pick out some frames while I fill out your prescription.

B: Thanks doc!

A: Arthur, that’s the bathroom.

 

#include<iostream> using namespace std; #include<string> #pragma warning(disable : 6031) class timetable { public: void draw(int x,int y); timetable() {}; private: const char* years[12] = { "January 1","Feburary 2","March 3","April 4","May 5","June 6" ,"July 7","August 8","September 9","October 10","November 11","December 12" }; int* days(int x); const char* weeks [7] = {"sun","mon","tue","wed","thu","fri","sat"}; int suanweek(int y, int i); }; int* timetable::days(int x) { if (x == 365) { static int arr[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; return arr; } else { static int arr1[12] = { 31,29,31,30,31,30,31,31,30,31,30,31 }; return arr1; } } void timetable::draw(int x, int y)//这个x是算出的天数,y是年份 { int* p = days(x); int count = 0; for (int i = 0;i < 12;i++) { for (int i = 0;i < 7;i++) { printf("%s", weeks[i]); printf("%c", ' '); } printf("\n"); int m = suanweek(y, i); if (m > 0) { while (m - 1) { printf("%c", ' '); m--; count++; } } else { for (int i = 0;i < 6;i++) { printf("%c", ' '); count++; } } for (int j = 1;j <= *(p + i);j++) { if (count % 7 == 0) { printf("\n"); count = 0; } else { printf("%d", j); printf("%c", ' '); count++; } } } } int timetable::suanweek(int y,int i) { int J, K=0; int m[12] = { 13,14,3,4,5,6,7,8,9,10,11,12 }; int q =1 ; if (i == 0 || i == 1) { J = (y-1)/ 100; K = (y-1)% 100; } else { J = y / 100; K = y % 100; } int h = (q + (13 * (m[i] + 1)/5) + K + (K / 4) + (J / 4) + 5 * J)%7; return h; } int main() { int n = 0; printf("请输入年份:"); scanf("%d", &n); printf("\n"); timetable a; if (n % 4 == 0 && n % 100 != 0) { a.draw(366, n); } else { a.draw(365, n); } return 0; } 帮我修改一下
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值