for循环的性质
来源:互联网 发布:模架编程 编辑:程序博客网 时间:2024/04/29 20:10
1.获取1-10间的和,并打印.
int sun=0;
for(int i=0;i<11;i++){
sum+=i;
}
system.out.printIn(sum);
2.1-100之间7的倍数的个数,并打印.
int d
for(int i=1;i<101;i++){
if(i%7==0)d++;
}
system.out.printIn(d);
用了累加思想.
*****
****
***
**
*
for(int i=0;i<5;i++){
for(int y=i;y<5;y++){
system.out.print("*");
}
system.out.printIn("");
}
*
**
***
****
*****
if(int i=0;i<5;i++){
if(int y=0;y<=i;y++){
system.out.print("*")
}
system.out.printIn("");
}
1
12
123
1234
12345
for(int i=1;i<6;i++){
for(int y=1;y<=i){
system.out.print(y)
}
system.out.printIn("");
}
打印9*9乘法表.
for(int i=1;i<10;i++){
for(int y=1;y<=i;y++){
system.out.print(y+"*"+i+"="+i*y+"\t")
}
system.out.printIn("");
}
- for循环的性质
- hdu 1005 用mod的循环性质
- [51Nod 1035 最长的循环节] 循环小数的性质
- 循环矩阵与傅里叶相关的几点性质
- 【for循环】增强的for循环
- for循环的疑问
- for循环的漏洞。
- 有意思的for循环
- 截然不同的for循环!
- for循环的应用
- 增强的for循环
- Python的for循环
- for循环的遍历
- for循环的优化
- 容器的for循环
- For 循环的优化
- For 循环的优化
- 增强的for循环
- [Ubuntu]为/××××准备的磁盘尚未就绪或不存在
- 《算法竞赛-训练指南》第一章-1.20_LA 3905
- USACO 1.2.3 Name That Number 命名那个数字
- U盘安装CentOS 6.4 + Windows 7双系统 (Windows 7下安装 CentOS 6.4)
- Linux中dd命令详解
- for循环的性质
- LevelDb
- vc++简单实现 分割字符串!
- hdu——1010(深搜加奇偶剪枝)
- 图像 高频 低频
- java设计模式---抽象工厂模式
- ARM Uboot经历——makefile与uboot目录
- UNIX网络编程——并发服务器(TCP)
- hdu1124-Factorial