码迷,mamicode.com
首页 > 其他好文 > 详细

利用+=n连续保存或者输出n个数

时间:2014-05-18 14:07:40      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:c语言   算法   

for (int k = 0; k < list.size(); k += 2) {
if (((k + 1) % 2) != 0) {


m1 = (MealEntity) list.get(k);
%>
<tr>
<td>
<a href="MealServlet?type=findbyid&mid=<%=m1.getMealId()%>"><img
src="mealImg/<%=m1.getMealImage()%>.jpg" width="148"
height="126" border="0" /> </a>
</td>
<td>
<div>
<%=m1.getMealId()%>
:
<%=m1.getMealName()%>
<br />
<span style="text-decoration: line-through; color: gray;">原价:人民币<%=m1.getMealPrice()%>元</span>
<br />
现价:人民币
<%=m1.getMemberPrice()%>

</div>
<a href="MealServlet?type=findbyid&mid=<%=m1.getMealId()%>"><img src="images/detail_cn.gif" border="0" width="60" height="20" /></a>
<a href="ShoppingCartServlet?type=add&mid=<%=m1.getMealId() %>"><img src="images/buy_cn.gif" border="0" width="60" height="20" /></a>
</td>
<%
if (k == list.size() - 1) {
break;
}
if (k < list.size() - 1) {
m2 = (MealEntity) list.get(k + 1);
} else {
break;
}
}
%>
<td>
<a href="MealServlet?type=findbyid&mid=<%=m2.getMealId()%>"><img
src="mealImg/<%=m2.getMealImage()%>.jpg" width="148"
height="126" border="0" /> </a>
</td>
<td>
<div>
<%=m2.getMealId()%>
:
<%=m2.getMealName()%>
<br />
<span style="text-decoration: line-through; color: gray;">原价:人民币<%=m2.getMealPrice()%>元</span>
<br />
现价:人民币
<%=m2.getMemberPrice()%>

</div>
<a href="MealServlet?type=findbyid&mid=<%=m2.getMealId()%>"><img src="images/detail_cn.gif" border="0" width="60" height="20" /></a>
<a href="ShoppingCartServlet?type=add&mid=<%=m2.getMealId() %>"><img src="images/buy_cn.gif" border="0" width="60" height="20" /></a>
</td>

利用+=n连续保存或者输出n个数,布布扣,bubuko.com

利用+=n连续保存或者输出n个数

标签:c语言   算法   

原文地址:http://blog.csdn.net/songjunyan/article/details/25972061

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!