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
1  Assignment Description   This is an individual assignment. Students are referred to the Faculty's policy on plagiarism.  In this assignment you will build a prototype of a si

What are the authentication methods in .NET? 1.Windows authentication 2.Forms authentication 3.Passport authentication 4.None/custom authentication

What is triple constraint triangle?   Figure: -Project Management Triangle The Project Management triangle is depicted as Cost, Schedule & scope. These 3 aspects for

Locate BUG website Project Description: Can you find a bug in easports fifa 14 ultimate team web app (easports/fifa/football-club/ultimate-team) so that i will earn a lot of

We need programmers and accountants Skills required are .NET, C# Programming, Graphic Design, Commercials, Software Architecture

This assignment is about writing a C# application that creates a minimal student enrolment system. The application will display lists of papers and students. The user can enrol stu

What is Microsoft Intermediate Language (MSIL)? The .NET Framework is shipped with compilers of all .NET programming languages to develop programs. There are separate compilers

I Need paypal and urolator pro api integrated in to aspx site Project Description: Need paypal and urolator pro api integrated in to aspx site. The is presently completed and

What is managed code and managed data? Managed code is code that is written to target the services of the Common Language Runtime. In order to target these services, the code m

Project Description: We are seeking a simple tool that can convert an existing flash file (.SWF) into HTML5. Our idea is to convert small flash games into html5 games. Please NO