Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Find and correct the error(s) in each of the following segments of co de: Points: 8 int x For ( x-100 , x>= 10

image text in transcribed
1. Find and correct the error(s) in each of the following segments of co de: Points: 8 int x For ( x-100 , x>= 10 ,x++) System.out.printin(x b) Correct following code so that it should output the even integers from 2 to 1 00. int counter. 2; // not allowed to change counter value do System.out.println"counter-" counter); counter +=2; 3 while (counter 100); c) Correct the following code so that it finds the sum of 10 numbers. sum=0; count-1; // not allowed to change value of sum and count Scanner keyboard new. Scanner(System.in); while (count 0) x=x + 2; System.out.printIn("x=" + x)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

OUTCOME 2 Identify and explain the privacy rights of employees.

Answered: 1 week ago

Question

1. Who will you assemble on the team?

Answered: 1 week ago