Ibanezix

Differences between revisions 5 and 6
Revision 5 as of 2008-09-24 13:18:13
Size: 60
Editor: cpe-131667
Comment:
Revision 6 as of 2008-09-24 13:23:43
Size: 767
Editor: cpe-131667
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
{{{#!/bin/bash === Πηγαίος κώδικας σε C++ ===

{{{#!cplusplus
int main(int argc, char **argv) {
  return 0;
}
}}}

=== Πηγαίος κώδικας σε Java ===

{{{#!java
import java.util.Date;
import java.util.Calendar;

public class IntDate
{
  public static Date getDate(String year, String month, String day)
    {
      // Date(int, int, int) has been deprecated, so use Calendar to
      // set the year, month, and day.
      Calendar c = Calendar.getInstance();
      // Convert each argument to int.
      c.set(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day));
      return c.getTime();
    }
}
}}}

=== Πηγαίος κώδικας σε Bash ===

{{{#!bash
Line 4: Line 34:

Πηγαίος κώδικας σε C++

   1 int main(int argc, char **argv) {
   2   return 0;
   3 }

Πηγαίος κώδικας σε Java

   1 import java.util.Date;
   2 import java.util.Calendar;
   3 
   4 public class IntDate
   5 {
   6   public static Date getDate(String year, String month, String day)
   7     {
   8       // Date(int, int, int) has been deprecated, so use Calendar to
   9       // set the year, month, and day.
  10       Calendar c = Calendar.getInstance();
  11       // Convert each argument to int.
  12       c.set(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day));
  13       return c.getTime();
  14     }
  15 }

Πηγαίος κώδικας σε Bash

#!/bin/bash


CategoryHomepage

Ibanezix (last edited 2008-09-24 13:23:43 by cpe-131667)