// WhileSwitchBreak.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"

#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	int i = 0;
	while (true)
	{
		switch (i)
		{
		case 1:
			break;
		default:
			break;
		}
		cout<<i <<" ";
		i++;

		if (i>10)
		{
			break;
		}
	}
	cin>>i;
	return 0;
}

 结果为:0 1 2 3 4 5 6 7 8 9 10

相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-04-02
  • 2022-12-23
  • 2021-09-17
  • 2021-07-24
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
相关资源
相似解决方案