{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSE HW5.docx - Home Work 1 The output produced by the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Home Work 1. The output produced by the segment is: 2 4 6 8 10 12 2 4 6 8 10 2 4 6 2 4 2. The output produced by the segment is: +++ ++++++ +++++++++ ++++++++++++ 3. The final output is: pottatto 4. import java.util.Scanner; public class PracticePracticePractice { public static void main(String[] args) { int even=0; int odd=0; int num=0; Scanner Keyboard = new Scanner(System.in); System.out.println("Enter a sequence: "); int count = Keyboard.nextInt(); int stringLength= str .length(); while (num<stringLength){ num=num++; count=count++;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}