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
I need Web Based Inventory Management System Project Description: I require a build in software which has the subsequent features, if anybody has ready to use web based appli

I want Text/Image printing Counter Project Description: Need your help in our C# programming project. We need to pass this project in two weeks starting from now to pass our

how do you do dot net programming

I am looking individuals who have industry experience working on Microsoft Technology and Jquery ( MVC 4.5 ), who will take live online session and give training through Team Viewe

Project Description: We require a Part time or long contract, Programmer/Developer working in Sydney. Task - Write PHP software into asp.net. Develop new software to enhan

Explain the difference between an ADO.NET Dataset and an ADO Recordset. The two main basic differences between recordset and dataset are as shown below :- 1) With the datase

I have the project that takes screen shots and saves in the specific folder.(eg.Screen0001) but the problem is that if i close application and run it again then it replace the exis

Sorting 2 Arrays & Merging into 1 - C# Program Hello, i didn't find the correct way to implement Array in my project. I am beginner for this language.  Please suggest me some

I need Online Slot Video Game For A Facebook Project Description: Prepare an online slot video game for a Face book promotion in order to attract new visits and Increase the

What are the naming conventions required for XML elements tags? The following are the naming conventions that need to be followed for XML elements tags: Element names should