Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Floating Point Arithmetic 

Pages 189

Clone this wiki locally

Floating Point Arithmetic

  • Category: Arithmetic

  • Description: This sample shows some basic floating point arithmetic

  • Code:

using System;
using System.Console;

    def x = 20.0 + 35.0 - 4.0;
    def y = x * 3.0 + 1.0;
    def r1 = x / 2.5;
    WriteLine($"x = $x, y = $y, r1 = $r1")

  • Execution Result:

x = 51, y = 154, r1 = 20.4


Copyright ©

Something went wrong with that request. Please try again.