摘要: 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。 给定任意N个符号,不一定能正好组成一个沙漏。要求打印出的沙漏能 阅读全文
posted @ 2018-03-09 16:18 王清河 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧! 输入格式: 输入在一行中给出正方形边长N(3<=N<=20)和组成正方 阅读全文
posted @ 2018-03-09 13:08 王清河 阅读(113) 评论(0) 推荐(0) 编辑
摘要: This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Inp 阅读全文
posted @ 2018-03-09 12:54 王清河 阅读(126) 评论(0) 推荐(0) 编辑
摘要: At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2018-03-09 11:11 王清河 阅读(125) 评论(0) 推荐(0) 编辑
摘要: With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ba 阅读全文
posted @ 2018-03-09 10:29 王清河 阅读(139) 评论(0) 推荐(0) 编辑