Java za mlade programere (1) - Tutoriali.org
Java za mlade programere (1) - Tutoriali.org
Java za mlade programere (1) - Tutoriali.org
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Konačni kôd u JCreatoru treba da ima sledeći oblik:/** Sub Sandwich Project* <strong>Java</strong> for Kids*/public class SubSandwich{public static void main(String[] args){int inchesPerStudent;int lengthSandwich1, lengthSandwich2;int students1, students2;// set valuesinchesPerStudent = 5;lengthSandwich1 = 114;lengthSandwich2 = 93;// determine how many students can eat eachsandwichstudents1 = lengthSandwich1 / inchesPerStudent;students2 = lengthSandwich2 / inchesPerStudent;// print resultsSystem.out.println("Letting each student eat " +inChesPerStudent + " inches");System.out.println((students1 + students2) + "students can eat these two sandwiches!");}}Dva puta proverite da ste svaki red upisali kako treba.