AP Computer Science A Unit 4 Study Guide/
AP Computer Science A Unit 4 Study Guide/ int a = 0; int b = 0; while (a 5 && b 3) { Sln(a + " " + b);a++;b++; } What is output? - -0 0 1 1 2 2 int n = 14; while (!(n % 3 == 0 && n % 5 == 0)) { Sln(n); n += 2; } What is the last number printed by this code? - -28 What is one potential problem with the following loop? S("Enter integers. Enter -1 to exit."); Sln(" Count of integers entered will be returned."); int n = 0; int c = 0 ;while (n != -1) { n = Int(); c++; } Sln(c); - -The loop counts when the user enters -1 into the keyboard, so the count will be one too many. What is one potential problem with the following loop? int n = 5; while (n != -1) { Sln(n); } - -Since n does not change the loop will not sto
Written for
- Institution
- AP Computer Science A
- Course
- AP Computer Science A
Document information
- Uploaded on
- January 25, 2024
- Number of pages
- 10
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
ap computer science a unit 4 study guide int a