Welcome to Actividad-1
Actividad-1 is a Java console application that performs fundamental array operations and statistical calculations. This program demonstrates core programming concepts including array manipulation, user input handling, and mathematical computations.What Does It Do?
The program takes two arrays of integers as input from the user and performs two main operations:- Element-wise Difference: Calculates the difference between corresponding elements of the two arrays
- Average Calculation: Computes the arithmetic mean of all input values across both arrays
Key Features
Array Input
Interactive console interface for entering 7 values into each of two arrays
Difference Calculation
Computes element-by-element differences (array1[i] - array2[i]) for all positions
Average Computation
Calculates the average of all 14 input values with decimal precision
Results Display
Shows both the calculated average and the complete difference array
Who Is This For?
This program is designed for:- Java Students: Learning fundamental array operations and control structures
- Programming Beginners: Understanding user input, loops, and basic calculations
- Educators: Teaching array manipulation and statistical computation concepts
- Developers: Reviewing basic Java syntax and Scanner usage
The program uses fixed-size arrays of length 7, making it ideal for demonstrating array concepts without complexity.
Core Concepts Demonstrated
Actividad-1 showcases several important programming concepts:- Array Declaration and Initialization: Creating multiple integer arrays
- Scanner Usage: Reading user input from the console
- Loop Structures: Using for loops for array iteration
- Arithmetic Operations: Subtraction and division operations
- Type Casting: Converting integers to doubles for precise average calculation
- Formatted Output: Using
printffor decimal formatting
Quick Navigation
Quickstart Guide
Get started with compiling and running Actividad-1
Main Class
Detailed breakdown of the Main class
Array Operations
Learn about array operations and calculations
Running the Program
Step-by-step execution guide
Input Format
Understanding input requirements
Program Output
When you run Actividad-1, you’ll see:- Prompts to enter 7 values for the first array
- Prompts to enter 7 values for the second array
- The calculated average of all input values
- A complete listing of the difference array showing each position and its value