Cs61b Notes
完成情况
name | Statement |
---|---|
hw0a | Solved |
hw0b | Solved |
lab01 | Solved |
lab02 | Solved |
proj0 | Solved |
lab03 | Solved |
proj1 | Solving |
Lecture
lecture01&02
basic java language See another post
Lab
lab0a
/**
- Exercise sourced from Practice-It by the University of Washington.
- Original problems available at: https://practiceit.cs.washington.edu/ *
- @author Erik Kizior */
// TODO: What is the output of the following program? public class NumberTotal { public static void main(String[] args) { int total = 25; for (int number = 1; ; ) { if (!(number <= (total / 2))) break; total = total - number; System.out.println(total + “ “ + number); number++; } } }
/* Before running the code, type your answer below.
TODO: Write output here 24 1 22 2 19 3 15 4 10 5 4 6 Then, click the green play button to check your work. */ public class NumberTotal { public static void main(String[] args) { int total = 25; for (int number = 1; number <= (total / 2); ) { total = total - number; System.out.println(total + “ “ + number); } } }
git log origin/main –not main git fetch skeleton git merge skeleton/main