Examples of C# statements

In this chapter you will learn:

In this chapter you will see some programming examples of C# statements that will help you to understand C# statements in details.

Qu 1:Write a program of calculating the percentage value of given number. After showing output asks user to whether continue or not. If continue, then again take input and shows the result. Hint: Use Goto label statement.

  • Output

    Enter a number: 342

    Enter Percentage Value: 23
    Percentage value is: 78.66

    Calculate again press 1. To quit Press digit: 1

    Enter a number: 732

    Enter Percentage Value: 45
    Percentage value is: 329.4

    Calculate again press 1. To quit press digit: 6
    Press Enter for quit


    After completing programming examples of statements, next you will get some  programming exercises of statements. You must do the exercises in order to improve your programming skills.

    Leave a Reply

    Your email address will not be published. Required fields are marked *