This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class test { | |
public static int sum( int i1, i2) { | |
int result = 0; | |
for (int i=i1; i<= i2; i++) | |
result += i; | |
return result; | |
} | |
public static void main ( String [] args){ | |
System.out.println("Sum from 1 to 10 is " + sum(1, 10)); | |
System.out.println("Sum from 20 to 37 is " + sum(20, 37)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE DAPP; | |
CREATE TABLE PURCHASES | |
(PURID INT PRIMARY KEY, | |
PURDATE DATETIME NOT NULL, | |
PURAMT MONEY NOT NULL); | |