Use Double to calculate Tax (C#) : Double « Language Basics « ASP.Net






Use Double to calculate Tax (C#)

<script Language="c#" runat="server">
  void Page_Load()
  {
    double dblEarn = 150;
    double dblTax = 23;
    double dblTotal = dblEarn - ((dblEarn/100)*dblTax);
    Display1.Text = dblTotal.ToString();
  }
</script>

<html>
<head>
  <title>Declaring Variables</title>
</head>
<body>
  <asp:label id="Display1" runat="server" />
</body>
</html>

           
       








Related examples in the same category

1.Read TextBox input, convert to double and do calculation (C#)