4-6 编程练习
本节编程练习不计算学习进度,请电脑登录imooc.com操作

编程练习

for 循环的特点,是把与循环有关的内容都放在(计数变量初始化;循环条件;变量自加)里面,使得程序结构清楚,适合于已知循环次数的循环。

任务

请在第 11 行完善 for 循环结构,使得程序能够打印 6 行“ Yeah! ”

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace Test
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. for ( )//请填写for循环结构
  12. {
  13. Console.WriteLine("Yeah!");
  14. }
  15. }
  16. }
  17. }
下一节