Dùng if và goto để tạo vòng lặp


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace lenh_goto
{
    class 
Program
    
{
        static 
void Main(string[] args)
        {
            
int i=1;
            
lap:
            if (
<= 10)
            {
                
Console.Write(" ");
                
i++;
           
             }
            
goto lap;

        }
    }
}  

Share this

Related Posts

Previous
Next Post »