Question: write a pseudocode and flowchart for this java program: import java.lang.*; import java.util.*; class Loop{ public static void main(String args[]){ Scanner input =new Scanner(System.in); System.out.print(Enter

write a pseudocode and flowchart for this java program:

import java.lang.*; import java.util.*; class Loop{ public static void main(String args[]){ Scanner input =new Scanner(System.in); System.out.print("Enter a number:"); int x = input.nextInt(); while(x!=0){ // 0 to exit condition if(x>0 && x<101){ // proceed to next loop if input 1-100 Otherwise Error message (except 0) System.out.print(x+" "); int y=x; for(int i=1;i<3;i++){ y = y * x; System.out.print(y+" "); } System.out.println(); }else{ System.out.println("Invalid Input!!, please provide valid input (0-100)"); //Error message } System.out.print("Enter a number:"); x = input.nextInt(); } }

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!