摘要: 1. 什么是Activity? 1. Activity作为Android四大组件之一,它有着举足轻重的地位,每一个Activity都会获得一个用于绘制其用户界面的窗口,Activity是一个view对象的容器,通过Window类的setContentView()方法添加到Activity上,最终提供 阅读全文
posted @ 2016-07-29 09:30 絮雨斜阳 阅读(2352) 评论(0) 推荐(0) 编辑
摘要: 输出100—999中所有的水仙花数,若3位数xyz满足 , 则xyz为水仙花数,例如 , 因此153是水仙花数。 include using namespace std; // 方法一 void daffodil_1() { int a = 0; for (int x=1; x 阅读全文
posted @ 2016-07-29 09:28 絮雨斜阳 阅读(24391) 评论(0) 推荐(0) 编辑
摘要: 一个m n的矩阵里按照下图形式填充,最后形成的矩阵即为蛇形矩阵,下图是m=4, n =5时的蛇形矩阵: 方法一:逐层循环 include using namespace std; const int ROW = 6; const int COLUMN = 10; const string space 阅读全文
posted @ 2016-07-29 09:22 絮雨斜阳 阅读(3600) 评论(0) 推荐(1) 编辑