Question

- Create a folder called pgm1 - In your folder pgm1, USING A WINDOWS EDITOR, create...

- Create a folder called pgm1
- In your folder pgm1, USING A WINDOWS EDITOR, create a java program named
Your lastName, firstLetterOfYourFirstName, pgm1W.java that will do the following:

Start here

- From your main method call a new method named: processArray
- In the processArray method, create one 10x10 two dimensions array named twoDarray
- In each index of your twoDarray, load the multiplication of its corresponding xy locations
- Using the printf java command display, in a perfect square, the even values found
in your array's locations
In the square locations where the values are nor even, display 2 blank spaces

0 0
Add a comment Improve this question Transcribed image text
Answer #1

import java.util.*;

public class easy{

public static void process_array()
{
int TwoDarray[][]= new int[10][10];
int a;
for(int i= 0;i<10;i++) {
for(int j=0;j<10;j++) {
a = i*j;
TwoDarray[i][j] = a;
if(a%2 == 0 && a>0)
System.out.printf(" %-2d ",a);
else
System.out.printf(" -- ");

}
System.out.println("\n");
}

}

public static void main(String[] args) {
process_array();
}

}

output:-

4 ー 2 4 6 8 10 12 14 16 18 12 18 - 24 一48121620 24 28 32 36 --10 一 6 12 18 24 30 36 42 48 54 .14 4256 ー81624 32 40 48 56 64 7

Add a comment
Know the answer?
Add Answer to:
- Create a folder called pgm1 - In your folder pgm1, USING A WINDOWS EDITOR, create...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a text file named “file1.txt” (by use of the notepad editor in Windows for instance)...

    Create a text file named “file1.txt” (by use of the notepad editor in Windows for instance) containing the following integer values, one per line: ​12 5 13 56 90 52 82 52 Write a Java program that reads these values from the file and displays their sum on the screen.

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • Create a program using Visual Studio 2017 called dataExercise.c that declares the following variables and displays...

    Create a program using Visual Studio 2017 called dataExercise.c that declares the following variables and displays their values: 1. Declare a character variable with value 'a', and display the character using printf with a %c format. Then add a second printf that displays the character with a %d format. 2. Declare a short int variable with a value set to the maximum value of a short int (the maximum value for whatever machine I happen to use to grade your...

  • Exercise: (2) Create a class called Dog containing two Strings: name and says. In main(), create...

    Exercise: (2) Create a class called Dog containing two Strings: name and says. In main(), create two dog objects with names “spot” (who says, “Ruff!”) and “scruffy” (who says, “Wurf!”). Then display their names and what they say. Be sure to use setter and getter methods to assign(set) and retrieve(get) values for both Strings name and says. Your Task: Create the program using Netbeans and easyUML (i.e: Open a project in NetBeans then create the classes, attributes, and methods in...

  • Write a python program and pseudocode The Program Using Windows Notepad (or similar program), create a...

    Write a python program and pseudocode The Program Using Windows Notepad (or similar program), create a file called Numbers.txt in your the same folder as your Python program. This file should contain a list on floating point numbers, one on each line. The number should be greater than zero but less than one million. Your program should read the following and display: The number of numbers in the file (i.e. count them) (counter) The maximum number in the file (maximum)...

  • Please include comments in java Create a command line program that can be used for computer...

    Please include comments in java Create a command line program that can be used for computer inventory purposes Create a super class that will store the following data: CPU speed Amount of RAM Hard Disk size Operating System Allow the user to enter data using any units of measurement they desire (i.e. - 500GB or 1TB for hard disk size). Create a class that inherits from the previous class and stores information for a Windows based computer. Store the following...

  • Programming in java In this part of this Lab exercise, you will need to create a...

    Programming in java In this part of this Lab exercise, you will need to create a new class named ArrayShiftMult. This class carries out simple manipulation of an array. Then you should add a main method to this class to check that your code does what it is supposed to do. 1. Create a BlueJ project named LAB06 as follows: a. Open the P drive and create a folder named Blue), if it does not exist already. Under this folder,...

  • Hi, I need help for solving Linux question. . 1.Using the proper text editor, create a...

    Hi, I need help for solving Linux question. . 1.Using the proper text editor, create a shell file called by (your name), your enrollment number, your program and the courses you study. Use the appropriate variables and display the above to the standard output (screen). . 2. Write A Shell Script to perform the following: Display the files and directories Print the date in 24 hour format Display the System id Display the current working directory Print the status of...

  • dont know how to do Create a web page using a text editor. Name the file...

    dont know how to do Create a web page using a text editor. Name the file with your name and the number of the assignment. Submit the assignment via D2L by 5:00 on the due date. Put your name on the last line in camelCase. Write a JavaScript function that gets a number from two to twenty-five from the user. Reject numbers that aren't in that range. Then find the double, square and total of all three numbers. Display all...

  • Windows operating system 1. Write a simple batch file named LastName Final.bat (where LastName is your...

    Windows operating system 1. Write a simple batch file named LastName Final.bat (where LastName is your own last name), which accomplishes the following: a Disable echo output b. Clear the screen c. Welcome the user with the following message (where current Date and curent Time is the computer's current date and current time, respectfully-these values should be output using a command line command, meaning do not type in the date or time into your batch file). A sample of this...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT