IN JAVA... Write a program that would create a one-dimensional array of length 7, with user-specified values and display the array values. Then search the array for the smallest value and display both the value and its position in the array.
import java.util.*;
public class Ideone
{
public static void main (String[] args)
{
Scanner sc=new
Scanner(System.in);
int i,min,index=0;
int [] arr=new int[7];
System.out.println("Enter the array
elements : ");
for(i=0;i<7;i++)
arr[i]=sc.nextInt();
min=arr[0];
System.out.print("Values of the
array : ");
for(i=0;i<7;i++)
System.out.print(arr[i]+" ");
for(i=0;i<7;i++)
{
if(min>arr[i])
{
min=arr[i];
index=i;
}
}
System.out.println("\nsmallest
value of the array "+min);
System.out.println("index of the
smallest value : "+index);
}
}
OUTPUT:-

// If any doubt please comment
IN JAVA... Write a program that would create a one-dimensional array of length 7, with user-specified...
Write a java program that specifies three parallel one dimensional arrays name length, width, and area. Each array should be capable of holding a number elements provided by user input. Using a for loop input values for length and width arrays. The entries in the area arrays should be the corresponding values in the length and width arrays (thus, area[i] = length [i]* width [i]) after data has been entered display the following output: (in Java)
In Java
2. Array Exercise ( 10 points) Write a Java program that will prompt the user to input a size of an array. Create an array of type int. Ask a user to fill the array. Create a functions sortArray() and mostFrequency(). The sortArray() function will sort number into incrementing order. The sorting function must be implemented from scratch and it must not use any function from the library. Feel free to use any sorting algorithm. The program will...
Q1. Write a program in Java a. Create 2 separate arrays, of user defined values, of same size b. Add these 2 arrays. ........................................................................................................................... Q2. Write a program in java (using loop) input any10 numbers from user and store in an array. Check whether each of array element is positive, negative, zero, odd or even number. ............................................................................................................................ Q3. Write a program in Java to display first 10 natural numbers. Find the sum of only odd numbers. .............................................................................................................................. Q4....
java Create a program that utilized a multi-dimensional array for the user to input the name of a team and their number of wins. The user should be able to input up to 10 teams and the wins for each team.
Java Programming Use a one-dimensional array to solve the following program. Write an application that inputs six numbers [Keep the numbers in an array]. The numbers must be between 20 and 200, inclusive. If the number is not between 20 and 200, ask for another input. When a number is entered, display the number only if it is not a duplicate of a number already entered. If it is a duplicate of a number already entered, display a message that...
Write a program that will create an array of ten integers, allow the user to enter those integers, and eventually search through the array based on index position: 1. Declare the array. You cannot assign elements to an array until it has first been created. 2. Next, run a for loop so that the user can enter an integer to save in each index position of the array. Since you this array holds ten elements , the index position starts...
Write a java program that create a 2 dimensional array of type double of size 10 by 10. Fill the array with random numbers using a random number generator. Print the array contents. Write a java program that creates a file called data.txt that uses the PrintWriter class. Write the numbers 1 to 42 into the file. Close the file. Attach both files. Thank you in advance
Write a java program that uses a loop to input, from the user not using gui, a collection of values that are the number of steps taken each day for a sequence of days and stores those amounts in an array. the array length should be 31, The user is not required to enter 31 values. the program determines and displays the largest number of steps for a single day, the smallest number of steps for a single day and...
Write a program that lets the user enter 10 values into an array. The program should then display the largest and the smallest values stored in the array. The program should display the following message to the user at the beginning "This program will ask you to enter ten values. Then it will determine the largest and smallest of the values you entered.Please enter 10 integers separated by spaces: " And then after user entered the numbers, it should display...
Write a Java program that will create a random list (array) randomize a search item to be found in the list sequentially search the array for that item. You must code the search and not use a search function. Display each comparison in the array; the element contents and the index. display whether the item was found or not. Now take that code and alter it to have two lists. Both lists randomize between 1 and 50. While traversing one list,...