1 / 2

Python

print 1 / 2
0

Python

from __future__ import division
print 1 / 2
0.5

Ruby

puts 1 / 2
0

JavaScript

console.log(1 / 2);
0.5

Perl

print 1 / 2;
0.5

Java

public class Tmp {
    public static void main(String[] args){
        System.out.println(1 / 2);
    }
}
0

C++

#include <stdio.h>
int main(){
  printf("%d\n", 1 / 2);
}
0

Clojure

(print (/ 1 2))
1/2

Scheme

(display (/ 1 2))
1/2

Table Of Contents

Previous topic

1 / 0

Next topic

With-statement

This Page