Search Header Logo
Loop_cs 122

Loop_cs 122

Assessment

Presentation

Computers

University

Easy

Created by

Christine Pitos

Used 3+ times

FREE Resource

20 Slides • 6 Questions

1

Control Stucture

By SDSSU-LC-BSCS Pitos

2

Open Ended

Calculate the following expression if x=5, y=4,z=3

what is !(x<y)?

3

Open Ended

Calculate the following expression if x=5, y=4,z=3

What is !(x<y) && (x>z)?

4

media
media

​If statement

Else ​If statement

5

Open Ended

Question image

1. What is the output of this code segment if the user enters 50?

6

Open Ended

Write a Java if-else statement that performs the calculation.

A mail-order catalog charges P50 shipping charge on orders up to P1000 and P100 on orders over P1000.

7

media

​LOOP/Repetitive

  • while loop

  • do while loop

8

media

9

media

10

media

11

media

12

media

13

media

14

media

15

media

16

media

17

media

18

media

19

media

20

media

21

media

22

media

23

media

24

Fill in the Blank

Use a for loop to print "Yes" 5 times.

for(int i = 0; i < 5; ______) {

System.out.println("Yes");

}

25

Open Ended

Write a forloop that prints out the numbers 5 – 50.

26

media

Control Stucture

By SDSSU-LC-BSCS Pitos

Show answer

Auto Play

Slide 1 / 26

SLIDE