using System;

namespace continue_的练习
{
class Program
{
static void Main(string[] args)
{
int sum = 0;
int i = 1;
//用 while continue实现计算1到100(含)之间的除了能被7整除之外所有整数的和
while(i<=100)
{
if (i % 7 != 0)
{
sum += i;
i++;
}
else
{
i++;
continue;
} }
Console.WriteLine(sum);
Console.ReadKey();
} }
}

continue练习的更多相关文章

  1. continue break 区别

    在循环中有两种循环方式 continue , break continue 只是跳出本次循环, 不在继续往下走, 还是开始下一次循环 break  将会跳出整个循环, 此循环将会被终止 count = ...

  2. 《Note --- Unreal --- MemPro (CONTINUE... ...)》

    Mem pro 是一个主要集成内存泄露检测的工具,其具有自身的源码和GUI,在GUI中利用"Launch" button进行加载自己待检测的application,目前支持的平台为 ...

  3. 《Note --- Unreal 4 --- Sample analyze --- StrategyGame(continue...)》

    ---------------------------------------------------------------------------------------------------- ...

  4. jquery each函数 break和continue功能

    jquery each函数 break和continue功能幸运的是另一个突破,持续一个jQuery循环方式.你可以打破在函数返回一个jQuery参数虚假循环.一个可以继续执行只是在做不指定返回值或返 ...

  5. break与continue的区别

    break       在while.for.do...while.while循环中使用break语句退出当前循环,直接执行后面的代码. continue   的作用是仅仅跳过本次循环,而整个循环体继 ...

  6. 高程(3):操作符、for、for...in循环、break/continue/return语句、函数等

    1.关系操作符 注意点:1)比较操作数是两个字符串,是比较字符串的字符编码值. 如:"a" > "b"  返回 false:"a" & ...

  7. Xcode will continue when iPad is finished. "Could not find Developer Disk Image"

    1:  Xcode will continue when iPad is finished. 等待进度条读取完成即可: 2: xcode,安装新版本的iOS 的 xcode 支持文件 的路径: /ap ...

  8. continue语句在for语句和while语句中的区别

    while语句的形式: while( expression ) statement for语句的形式: for( expression1; expression2;expression3 )   // ...

  9. JAVA的continue用法

    JAVA的continue用法: public class test{ public static void main(String [] args){  for(int i=0;i<=10;i ...

  10. js补充小知识点(continue,break,ruturn)

    1.continue,break,ruturn eg:1-100的和 $(function () { $("#hello").click(function () { var iNu ...

随机推荐

  1. php的几种接值方式

    1.传单个参数 单个参数这种比较简单,例如 想像edit操作里面传递一个id值,如下写法__URL__/edit/id/1 http://localhost/index.php/user/edit/i ...

  2. antd-vue 框架的日期选择选年份

    <a-date-picker :placeholder="placeholder" mode="year" format="YYYY" ...

  3. 粉色的猫MISC(bugku)

    一  题目描述 ps:本题特别感谢树叶大佬给的一些提示以及WP!欢迎大家关注树木有点绿~~ 二 解题过程 下载附件得到zip压缩包 根据作者提示,压缩包注释应该为压缩包密码. 1.压缩包密码 一开始看 ...

  4. IDEA的常用快捷键和文档注释

    IDEA的常用快捷键 Alt + 回车 导入包,自动修正 Ctrl + N 查找类 Ctrl + Shift + N 查找文件 Ctrl + Alt + N 格式化代码 Ctrl + Alt + O ...

  5. word和excel转pdf

    1.下载jacob.jar包  网址:https://sourceforge.net/projects/jacob-project/files/jacob-project/ 2.导入到本地仓库:mvn ...

  6. EF中使用SqlBulkCopy

    using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using S ...

  7. 【Go】发送请求

    发送post请求 reqMap := make(map[string]interface{}) reqMap["order_num"] = request.OutTradeNo r ...

  8. Redis哨兵模式+缓存穿透、击穿和雪崩

    一.哨兵模式概述(自动选主机的方式)主从切换技术:当主机宕机后,需要手动把一台从(slave)服务器切换为主服务器,这就需要人工干预,费时费力,还回造成一段时间内服务不可用,所以推荐哨兵架构(Sent ...

  9. Java语言中的复合运算符会自动进行类型转换

    计算1/1-1/2+1/3+--+1/99-1/100 public class LoopControlExercise08{ public static void main(String[] arg ...

  10. vscode1.50配置python虚拟环境

    1.首先你需要   创建好虚拟环境,如果不会 可以先点击学习一下 https://www.cnblogs.com/shyern/p/11284127.html      (创建虚拟环境的博客) 2.打 ...