Skip to content
Snippets Groups Projects
Commit 21bab1db authored by Leevi Jälkö's avatar Leevi Jälkö
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
/nro_1.class
/nro_2.class
/nro_1$LaskukoneTest.class
/nro_3.class
/.settings
/.classpath
/.project
public class nro_1 {
public class LaskukoneTest {
int tulos;
public LaskukoneTest() {
nollaa();
}
public void lisaaLuku(int luku) {
tulos += luku;
}
public void vahennaLuku(int luku) {
tulos += luku;
}
public void kerroLuvulla(int luku) {
for (int i=1; i<luku; i++) {
lisaaLuku(luku);
}
}
public void korotaPotenssiin(int luku) {
for (int i=1; i<=luku; i++) {
kerroLuvulla(luku);
}
}
public int annaTulos() {
return tulos;
}
public void nollaa() {
tulos = 1;
}
}
}
public class nro_2 {
public static void main(String[] args){
System.out.print("Hellou, miten menee?");
}
}
\ No newline at end of file
public class nro_3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Kukkuu kuka siell");
System.out.println("Niin niin");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment