BFergerson / GitSocratic

Source code query command line interface
Apache License 2.0
8 stars 0 forks source link

In readme show adding literals across languages #3

Closed BFergerson closed 5 years ago

BFergerson commented 5 years ago

Go

package main

import "fmt"

func main() {
    for k := 10; k >= 1; k-- {
        fmt.Println(k)
    }
}

Java

public class SameProgram {
  public static void main(String [] args) {
    for (int k = 10; k >= 1; k--) {
      System.out.println(k);
    }
  }
}

JavaScript

for (var k = 10; k >= 1; k--) {
    console.info(k);
}