Demonstrating use of break, continue & goto - c# program, DOT NET Programming

Demonstrating use of break, continue & goto - C# Program

How can i use break, continue & goto in my assignment, I am looking for a program in C#. It would be feel great if anyone helps me?

Posted Date: 2/12/2013 12:22:55 AM | Location : United States





Well, I think that should not be so much difficult. You can use this code.

using System;  

class BreakContiuneGoto

{

  public static void Main()

 {

   int n = 10;

   while(n<200)

  {

    if(n<100)

   {

     if(n<50)

    {

      goto lessthan50;

    }

    Console.Write(" " +n);

    n = n + 20;

continue;

}  

lessthan50:

{

Console.Write(" " +n);

n = n + 10;

continue;

}  

if(n==50)

{

Console.WriteLine("");

n = n + 10;

continue;

}  

if(n > 90)

break;

Console.Write(" " +n);

n = n + 10;

}

Console.WriteLine();

Console.ReadLine();

}

}

Posted by diana | Posted Date: 2/12/2013 12:24:28 AM

Output:
10 20 30 40 50 60 70 80 90 110 120 130 140 150 160 170 180 190.

Posted by Jack | Posted Date: 2/12/2013 12:25:10 AM


Related Discussions:- Demonstrating use of break, continue & goto - c# program, Assignment Help, Ask Question on Demonstrating use of break, continue & goto - c# program, Get Answer, Expert's Help, Demonstrating use of break, continue & goto - c# program Discussions

Write discussion on Demonstrating use of break, continue & goto - c# program
Your posts are moderated
Related Questions
This is a project specifically made for shirohime. Skills required: .NET, Fashion Design, Virtual Assistant

Project Description: i will testing some software which you need and i promise to do my job is the best way, and as fast as possible. Skills required: .NET, MySQL, C# P

What are the different types of literals? A literal is a textual representation of an exacting value of a type. The dissimilar types of literals in Visual Basic are: Boo

Project Description: I am seeking software that can do the subsequent: 1. Check position for a URL in Google, Bing, Yahoo. 2. Check position for a Youtube video in Youtube

What are the different levels Of IIS isolation?  The IIS consist of 3 level of isolation as shown below:- LOW (IIS process):- In this type of isolation the main IIS proc

What is DMAIC and DMADV? The Six Sigma has two key methodologies viz. DMAIC and DMADV. The DMAIC is used to improve an existing business process. While DMADV is used to create

Need Software Reconfiguration Project Description: I have a small program -exe that after selecting an item from the menu it start an .xls file and executes a security proces

.NET is Compile Time OR RunTime Environment?   .Net's framework has CLS,CTS and CLR.CTS checks declaration of types at the time when u write code and CLS defines some rules and

What is CTS and CLS? => CLS stands for common language specification where as CTS stands for common type system. => CLS : cls is a standard for .net . cls is small set of sp

Need Experienced dot Net and PHP Programmers Project Description: Need Experienced dot Net., JSP, PHP, Java Programmers Skilled professional and command in Programming eit