8:40 class demo{ public static void main(String[] args){ //code def: using array to get ten variables to print using for loop int[] numbers = new int[10]; for(int i=0;i
public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("number of arrays: "); int size = scan.nextInt(); int[] arr = new int[size]; for (int i = 0; i
Table program Program: import java.util.Scanner; class array{ public static void main(String args[]) { Scanner scan=new Scanner(System.in); System.out.println("Enter table number"); int num=scan.nextInt(); for (int i=1;i
import java.util.Scanner; class sample { public static void main(String args[]) { Scanner scan = new Scanner(System.in); // STEP 1: Get input for the size of an array System.out.print("Enter the size of the array: "); int size = scan.nextInt(); // STEP 2: Create an array int[] array = new int[size]; // STEP 3: Get input for each element in the array using for loop for(int i = 0; i < size; i++) { System.out.print("Enter number " + (i + 1) + " : "); array[i] = scan.nextInt(); } // STEP 4: Printing the whole array for reference using for loop System.out.print(" "); for(int i = 0; i < size; i++) { System.out.println("Array of " + i + " : " + array[i]); } System.out.print(" "); // STEP 5: To find the middle element in the array int k = array.length; int mid = k / 2; // STEP 6: Print the middle element for both odd and even cases if(k % 2 != 0) { System.out.println("Middle element: " + array[mid]); } else { System.out.print("Middle elements: " + array[mid - 1]); System.out.print(" and " + array[mid]); } } }
Thanks bro problem ahh paadhile vittadhuku 😂midhiya Naa yosichi yosichi thala Vali vandhuduchi😂but finally I got the output 😅 it's very fun package practice; import java.util.Scanner; public class aaray { public static void main(String args[]) { Scanner abc=new Scanner(System.in); int size=abc.nextInt(); int[] number=new int[size]; int i=0; for(i=0;i
import java.util.Scanner; class MiddleElement { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // Getting the size of the array System.out.print("Enter the size of the array: "); int size = scanner.nextInt(); // Declaring the array int[] array = new int[size]; // Getting the elements of the array System.out.println("Enter the elements of the array:"); for (int i = 0; i < size; i++) { array[i] = scanner.nextInt(); } // Finding and printing the middle element int middleIndex = size / 2; if (size % 2 == 0) { System.out.println("Middle elements are: " + array[middleIndex - 1] + " and " + array[middleIndex]); } else { System.out.println("Middle element is: " + array[middleIndex]); } } }
package challenge4; // Print 10 number from an array using forloop public class q2 { public static void main(String[] args) { int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; for (int i = 0; i
import java .util.Scanner; public class Main { public static void main(String[] args) { Scanner get=new Scanner(System.in); System.out.print("Enter the number:"); int a=get.nextInt(); for(int i=1;i
Tables Challenge Program :import java.util.*; class Taables{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n=scan.nextInt(); if(n==5){ n = 10; } for(int i=1;i
program for any tables import java.util.Scanner; class num{ public static void main (String args[]){ Scanner scan = new Scanner(System.in); System.out.println("enter the number for which you want the table:"); int tablenumber= scan.nextInt(); for(int i=1; i
import java.util.Scanner; public class Practice { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter the table's number you want: "); int num = scan.nextInt(); for(int i=1; i
Q4 full answer package Practice_Jav; import java.util.Scanner; public class lesson3q4 { public static void main(String[] args) { // TODO Auto-generated method stub
Scanner scan =new Scanner(System.in); int a = scan.nextInt(); int [] size = new int[a];
import java.util.Scanner; class ex1{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("How much inputs you need to enter?"); int total = scan.nextInt();
int[] arr = new int[total]; System.out.println("Enter the inputs :"); for(int i = 0;i
@@Jeevanplayboy bro ippo antha array sizea check panrom suppose athu even a iruntha athuku 2 middle elements irukumla atha print pannanum and odda iruntha atha "total size " / 2 panna namaku mid element Location kedaikum so namma (arr[total size/ 2]) podum bothu namalala mid element a print panna mudiyum..
question 2 import java.util.Scanner; public class chall1 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] arr = new int[5]; System.out.println("Please enter 5 integers:"); for (int i = 0; i < 5; i++) { arr[i] = scan.nextInt(); } System.out.println("You entered:"); for (int num : arr) { System.out.println(num); } } }
import java.util.Scanner; class main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); int size = scan.nextInt(); int[] marks= new int[size]; for(int i= 0;i
import java.util.Scanner; public class siz{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int mark = scan.nextInt(); int[] ma = new int[mark]; for (int i=0;i
import java.util.Scanner; public class sample { public static void main(String args[]){ Scanner scan = new Scanner(System.in); System.out.println("enter the number for the table multiplication"); int j= scan.nextInt();
16:26 import java.util.Scanner; class demo{ public static void main(String args[]){ Scanner s = new Scanner(System.in); System.err.println("Enter yout Table Number"); int a = s.nextInt(); int[] arr = new int [a]; for(int i=0;i
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan= new Scanner(System.in); int[] number= new int[10]; for(int i=0;i
import java.util.Scanner; public class MultiplicationTable { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter a number: "); int num = scanner.nextInt(); System.out.println("Multiplication table of " + num + ":"); for (int i = 1; i
import java.util.Scanner; public class ten{ public static void main(String args[]){ Scanner nisha = new Scanner(System.in); int[] numbers = new int[10]; for(int i = 0; i
import java.util.Scanner; public class Sample { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Which multiplication table you want :"); int table=scan.nextInt(); for(int i=0;i
import java.util.Scanner; public class challenge3{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int arr[] = new int[10]; for(int i=0;i
Hi Anna, Mid Element find pannurathuku Enna Pannanum import java.lang.System; import java.util.Scanner; class hello{ public static void main(String args[]) { System.out.println("What is the Size of your Array?"); Scanner Scan = new Scanner(System.in); int Size = Scan.nextInt(); { System.out.println("What are the Elements in your Array"); } { int[] Element = new int[Size]; { for(int i=0; i
import java.util.Scanner; class num{ public static void main (String args[]){ Scanner scan = new Scanner(System.in); int[] score = new int[10]; for(int i=0; i
import java.util.Scanner; class demo{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); for(int i=1;i
import java.util.Scanner; class hello { public static void main(String args[]) { int i; Scanner scan = new Scanner(System.in); System.out.print("Enter the size of an array:"); int size = scan.nextInt(); int[] arr = new int[size]; for (i=0; i
import java.util.Scanner; class test3{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int num[] = new int[10]; for(int i=0;i
question 4 : Middle Element import java.util.Scanner; class hello{ public static void main(String[] args) { Scanner art = new Scanner(System.in); int n = art.nextInt(); int[] num = new int[n]; for(int i=0 ; i
package working; import java.util.Scanner; public class Coding3_part2_Q4 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); int input = scan.nextInt(); int [] array = new int[input]; for (int i=0; i
Import java. util. Scanner ; Class array { P. S. V. M. (Str.in); { Scanner scan = new Scanner (System.in) ; Int table = scan. nextInt() ; Int[] num= new int [10]; For(int I=1;I
Middle Element solution - import java.util.Scanner; class ex1{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("How much inputs you need to enter?"); int total = scan.nextInt();
int[] arr = new int[total]; System.out.println("Enter the inputs :"); for(int i = 0;i
import java.util.Scanner; public class Megna { public static void main(String[] args) { int[] number = new int[12]; Scanner scanner = new Scanner(System.in); int num = scanner.nextInt(); for (int i=1; i
//Table Problem Using User input// import java.util.Scanner; class hello{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.print("Enter Table No:"); int table = scan.nextInt(); for(int i=1;i
import java.util.Scanner; class ex1{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("How much inputs you need to enter?"); int total = scan.nextInt();
int[] arr = new int[total]; System.out.println("Enter the inputs :"); for(int i = 0;i
@PreethiSiva-gb3qs import java.util.Scanner; class ex1{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("How much inputs you need to enter?"); int total = scan.nextInt();
int[] arr = new int[total]; System.out.println("Enter the inputs :"); for(int i = 0;i
import java. util. Scanner; class HelloWorld { public static void main(String[] args) { Scanner scan= new Scanner(System.in); int a= scan. nextInt(); for(int i=1; i
user input table import java.util.Scanner; class hello{ public static void main(String[] args) { Scanner scan=new Scanner(System.in); System.out.println("Enter the number of table which you want="); int table=scan.nextInt();
package challenge4; import java.util.Scanner; // Get input for size of an array // Get input for each element in an array // Find the middle element in an array public class q4 { public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { // Get the size of an array System.out.print("Enter the size of an array:"); int size = scan.nextInt(); int[] arr = new int[size]; // Get the input for each element in an array for (int i = 0; i
import java.util.Scanner; class ForLoop { public static void main(String[] args) { int[] numbers =new int[10]; Scanner s = new Scanner(System.in); for(int i =0;i
Bro you didn't complete last question last part but I have completed it see this bro please class one { public static void main(String[] args) { try (Scanner inputScanner = new Scanner(System.in)) { System.out.println("Enter size of the array..."); int a = inputScanner.nextInt(); int[] num = new int[a]; for (int i = 0; i < a; i++) { int b = inputScanner.nextInt(); num[i] = b; } if(a % 2 == 0){ int middle2 = a / 2 ; int middle1 = middle2 - 1;
System.out.print("Middle Element : " + num[middle1] + ", " + num[middle2]); } else{ int middle1 = a / 2; System.out.print("Middle Element : " + num[middle1]); } } } }
@MUKESHS-n4p import java.util.Scanner; class ex1{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("How much inputs you need to enter?"); int total = scan.nextInt();
int[] arr = new int[total]; System.out.println("Enter the inputs :"); for(int i = 0;i
Question: to print tables for a number import java.util.Scanner; class qn18{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("Enter the number for which you want the table"); int num = scan.nextInt(); System.out.println("Enter the multiples upto which the table of the number needs to be printed"); int upto = scan.nextInt(); for(int i=1;i
@neelag28 import java.util.Scanner; class ex1{ public static void main(String args[]) { Scanner scan = new Scanner(System.in); System.out.println("How much inputs you need to enter?"); int total = scan.nextInt();
int[] arr = new int[total]; System.out.println("Enter the inputs :"); for(int i = 0;i
import Java. Until. Scanner Class hello { Public static void main ( string args ( ) ) { Scanner scan =new scanner ( system. In) Int marks [ ] = scan next int (10) ; For (int marks i= 0; i
public class hello { public static void main(String[] args) { Scanner a =new Scanner(System.in); System.out.print("enter a Number:"); int num=a.nextInt(); for(int i=1;i
import java.util.Scanner; class HelloWorld { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter Array Length"); int size = scan.nextInt(); int[] marks = new int[size]; int mid = size/2; for(int i = 0; i < size; i++) { marks[i] = scan.nextInt(); }
System.out.println("The middle length number is:"+mid); System.out.println(marks[mid]); } }
import java.util.Scanner; class code{ public static void main(String args[]) { Scanner object= new Scanner(System.in); int o=object.nextInt(); for(int i=1;i
8:40
class demo{
public static void main(String[] args){
//code def: using array to get ten variables to print using for loop
int[] numbers = new int[10];
for(int i=0;i
Super bro and I also do like this in starting
Put the line like this
int[] numbers =new int[]{1,2,3,4,5,6,7,8,9,10};
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
System.out.println("number of arrays: ");
int size = scan.nextInt();
int[] arr = new int[size];
for (int i = 0; i
Thanks
bro I have a doubt, what if the size of the array is 7?
@@logupavithranlogupavithran2743 user Ena input kudukurangalo atha bro size
@@logupavithranlogupavithran2743Index 3 is middle value
public static void main(String args[]){
int[] a ={1,2,3,4,5,6,7,8,9,10};
for(int i=0;i
Table program
Program:
import java.util.Scanner;
class array{
public static void main(String args[])
{
Scanner scan=new Scanner(System.in);
System.out.println("Enter table number");
int num=scan.nextInt();
for (int i=1;i
Scanner scan = new Scanner(System.in);
System.out.print("multiplication factor: ");
int factor = scan.nextInt();
for (int i = 1; i
class array_10
{
public static void main(String args[])
{
int[] nums={1,2,3,4,5,6,7,8,9,10};
for (int i=0;i
public class loop{
public static void main(String[] args) {
int[] mark = {10,15,12,45,5,78,45,89,63,10};
for (int i=0;i
Super bro
bro 15:56 la (i
Ama broo
import java.util.Scanner;
class sample
{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
// STEP 1: Get input for the size of an array
System.out.print("Enter the size of the array: ");
int size = scan.nextInt();
// STEP 2: Create an array
int[] array = new int[size];
// STEP 3: Get input for each element in the array using for loop
for(int i = 0; i < size; i++)
{
System.out.print("Enter number " + (i + 1) + " : ");
array[i] = scan.nextInt();
}
// STEP 4: Printing the whole array for reference using for loop
System.out.print("
");
for(int i = 0; i < size; i++)
{
System.out.println("Array of " + i + " : " + array[i]);
}
System.out.print("
");
// STEP 5: To find the middle element in the array
int k = array.length;
int mid = k / 2;
// STEP 6: Print the middle element for both odd and even cases
if(k % 2 != 0)
{
System.out.println("Middle element: " + array[mid]);
}
else
{
System.out.print("Middle elements: " + array[mid - 1]);
System.out.print(" and " + array[mid]);
}
}
}
super
💯
Mass🔥
😮
public class demo {
public static void main(String[] args) {
int[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
for (int i = 0; i < 10; i++) {
System.out.println(numbers[i]);
}
}
}
get input ma using scanner
In question doesn't ask get input
It is wrong, already you gave a value to the array then what is the purpose of loop and again re assigning the value to it?
Thanks bro problem ahh paadhile vittadhuku 😂midhiya Naa yosichi yosichi thala Vali vandhuduchi😂but finally I got the output 😅 it's very fun
package practice;
import java.util.Scanner;
public class aaray {
public static void main(String args[]) {
Scanner abc=new Scanner(System.in);
int size=abc.nextInt();
int[] number=new int[size];
int i=0;
for(i=0;i
Super
Can you please share the ans
For(i=0;i
Class 5table{
public static void main(String[] args)
{
for (int i=1;i
i*5 nu pottale varume bro.. Edhuku i+i*4 nu potrukinga
Question No : 2
class hello{
public static void main(String args[])
{
int[] array = {1,2,3,4,5,6,7,8,9,10};
for(int element:array)
{
System.out.println(element);
}
}
}
Your videos are the most useful for my future thanks for sharing another informative video
import java.util.Scanner;
class MiddleElement {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Getting the size of the array
System.out.print("Enter the size of the array: ");
int size = scanner.nextInt();
// Declaring the array
int[] array = new int[size];
// Getting the elements of the array
System.out.println("Enter the elements of the array:");
for (int i = 0; i < size; i++)
{
array[i] = scanner.nextInt();
}
// Finding and printing the middle element
int middleIndex = size / 2;
if (size % 2 == 0)
{
System.out.println("Middle elements are: " + array[middleIndex - 1] + " and " + array[middleIndex]);
} else
{
System.out.println("Middle element is: " + array[middleIndex]);
}
}
}
chat gpt
import java.util.Scanner;
class test5{
public static void main(String args[])
{
Scanner scan=new Scanner(System.in);
int table=scan.nextInt();
for(int i=1;i
public class Main {
public static void main(String[] args) {
int [] arry={1,2,3,4,5,6,7,8,9,10};
for(int i=0;i
instead of -1 we can remove = from for loop.
package challenge4;
// Print 10 number from an array using forloop
public class q2 {
public static void main(String[] args) {
int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
for (int i = 0; i
public static void main(String args[]) {
int[] mark=new int[10];
for (int i=1; i
bro for loop la int i=0 nu kudutha thane bro 0 to 9 varaikum 10 numbers varum 1 to 9 kuduthal 9 number thane varum change pannikonga
import java .util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner get=new Scanner(System.in);
System.out.print("Enter the number:");
int a=get.nextInt();
for(int i=1;i
🤜🏻🤛🏻
Bro print pandra edathula fault eruku bro i podura edathula a podanum bro
@@umasankari5226 bro ithu correct than bro "a" pota than bro 2x1=2 ,intha mathiri print hagum bro
"a" value is 2 bro
Bro find and print middle element question ku explanation video la varala
Tables Challenge Program :import java.util.*;
class Taables{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n=scan.nextInt();
if(n==5){
n = 10;
}
for(int i=1;i
Question 2 code:
import java.util.Scanner;
import java.lang.System;
public class arraycodechallenge {
public static void main(String[] args) {
int[] x=new int[10];
int i;
for( i=0;i
program for any tables
import java.util.Scanner;
class num{
public static void main (String args[]){
Scanner scan = new Scanner(System.in);
System.out.println("enter the number for which you want the table:");
int tablenumber= scan.nextInt();
for(int i=1; i
public static void main (String args[]){
Scanner tab= new Scanner(System.in);
int le=tab.nextInt();
System.out.println("table for "+le);
for(int i=1;i
2nd problem:
int[] num = {1,2,3,4,5,6,7,8,9,10};
for(int i=0;i
👍
import java.util.Scanner;
public class Practice {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter the table's number you want: ");
int num = scan.nextInt();
for(int i=1; i
wrong
import java.util.Scanner;
class hello{
public static void main(String[] args) {
Scanner Sc = new Scanner(System.in);
int num = Sc.nextInt();
for(int i=1;i
Thanks I forgot to change the x2
Q4 full answer
package Practice_Jav;
import java.util.Scanner;
public class lesson3q4 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan =new Scanner(System.in);
int a = scan.nextInt();
int [] size = new int[a];
for(int i = 0 ; i
Bro middle element kandu pidkira part kanom video la check pannunga
S
Broo
import java.util.Scanner;
class ex1{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.println("How much inputs you need to enter?");
int total = scan.nextInt();
int[] arr = new int[total];
System.out.println("Enter the inputs :");
for(int i = 0;i
@@-CA-SuthiV knjm explain pannu bro plz😢😢😢😢
@@Jeevanplayboy bro ippo antha array sizea check panrom suppose athu even a iruntha athuku 2 middle elements irukumla atha print pannanum and odda iruntha atha "total size " / 2 panna namaku mid element Location kedaikum so namma (arr[total size/ 2]) podum bothu namalala mid element a print panna mudiyum..
class Demo{
public static void main(String[] args) {
int[] a = {1,2,3,4,5,6,7,8,9,10};
for(int x : a){
System.out.println(x);
}
}
}
get input bro
@@harikeshchandraganesh1935public class ArrayPrintnum {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int[] num-new int[10];
for (int i=0;i
Please tell
class Hello {
public static void main(String[] args) {
int[] marks= new int[10];
for(int i =0 ; i
question 2
import java.util.Scanner;
public class chall1 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] arr = new int[5];
System.out.println("Please enter 5 integers:");
for (int i = 0; i < 5; i++) {
arr[i] = scan.nextInt();
}
System.out.println("You entered:");
for (int num : arr) {
System.out.println(num);
}
}
}
we can change a arrage value and loop value
Scanner scan = new Scanner(System.in);
System.out.println("Enter the Values");
int n = scan.nextInt();
int[] ar = new int[n];
for(int i=0; i
import java.util.Scanner;
class main
{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
int size = scan.nextInt();
int[] marks= new int[size];
for(int i= 0;i
Bro neeyanga sollitharathulam puriyuthu bro pannuran coding but oru problem statement kudutha enaku takunu poda varamatikuthu bro
import java.util.Scanner;
public class siz{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int mark = scan.nextInt();
int[] ma = new int[mark];
for (int i=0;i
import java.util.Scanner;
public class sample {
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
System.out.println("enter the number for the table multiplication");
int j= scan.nextInt();
for(int i=1; i
class java {
public static void main(String[] args) {
int[] num=new int[9];
for (int i=1;i
class code{
public static void main(String args[])
{
// int[] variable=new int[9];
int[] variable={1,2,3,4,5,6,7,8,9,10};
for(int i=0;i
public class forlooparrayprint10num {
public static void main(String[] args) {
int [] arr={1,2,3,4,5,6,7,8,9,10};
for(int i=0;i
For loop la i++ potta loop aagum pota...so i+1 enter panunga
16:26
import java.util.Scanner;
class demo{
public static void main(String args[]){
Scanner s = new Scanner(System.in);
System.err.println("Enter yout Table Number");
int a = s.nextInt();
int[] arr = new int [a];
for(int i=0;i
Q2
int[]goat={1,2,3,4,5,6,7,8,9,0};
for(int i=0;i
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan= new Scanner(System.in);
int[] number= new int[10];
for(int i=0;i
import java.util.Scanner;
public class MultiplicationTable {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a number: ");
int num = scanner.nextInt();
System.out.println("Multiplication table of " + num + ":");
for (int i = 1; i
class ben{
public static void main(String args[]){
int [] n = {1,2,3,4,5,6,7,8,9,10};
for(int i=0;i
you got the correct ANSWER it is wrong
@@DivyaDivya-wh1vb how bro
import java.util.Scanner;
public class ten{
public static void main(String args[]){
Scanner nisha = new Scanner(System.in);
int[] numbers = new int[10];
for(int i = 0; i
import java.util.Scanner;
public class Sample {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Which multiplication table you want :");
int table=scan.nextInt();
for(int i=0;i
Wrong
import java.util.Scanner;
public class challenge3{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int arr[] = new int[10];
for(int i=0;i
int[] num=new int[10];
for(int i=0;i
Romba ValaVala Nu sollitharatha brooo
Broo Full video upload panunga pls🙏🏻
Hi Anna, Mid Element find pannurathuku Enna Pannanum
import java.lang.System;
import java.util.Scanner;
class hello{
public static void main(String args[])
{
System.out.println("What is the Size of your Array?");
Scanner Scan = new Scanner(System.in);
int Size = Scan.nextInt();
{
System.out.println("What are the Elements in your Array");
}
{
int[] Element = new int[Size];
{
for(int i=0; i
Super
But small mistake so once again check
import java.util.Scanner;
class num{
public static void main (String args[]){
Scanner scan = new Scanner(System.in);
int[] score = new int[10];
for(int i=0; i
C# video podunga anna please
import java.lang.System;
import java.util.Scanner;
class hello{
public static void main(String args[])
{
Scanner Scan = new Scanner(System.in);
int[] Score = new int[10];
{
for(int i=0; i
import java.util.Scanner;
class demo{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
for(int i=1;i
import java.util.Scanner;
class hello
{
public static void main(String args[])
{
int i;
Scanner scan = new Scanner(System.in);
System.out.print("Enter the size of an array:");
int size = scan.nextInt();
int[] arr = new int[size];
for (i=0; i
import java.util.Scanner;
class test3{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int num[] = new int[10];
for(int i=0;i
import java.util.Scanner;
class array{
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int size =scan.nextInt();
int[] mark =new int[size];
for(int i=0;i
question 4 : Middle Element
import java.util.Scanner;
class hello{
public static void main(String[] args)
{
Scanner art = new Scanner(System.in);
int n = art.nextInt();
int[] num = new int[n];
for(int i=0 ; i
package working;
import java.util.Scanner;
public class Coding3_part2_Q4 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in);
int input = scan.nextInt();
int [] array = new int[input];
for (int i=0; i
Import java. util. Scanner ;
Class array {
P. S. V. M. (Str.in);
{
Scanner scan = new Scanner (System.in) ;
Int table = scan. nextInt() ;
Int[] num= new int [10];
For(int I=1;I
import java.util.Scanner;
class Main
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int[] num=new int[10];
{
for(int i=0;i
Middle Element solution -
import java.util.Scanner;
class ex1{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.println("How much inputs you need to enter?");
int total = scan.nextInt();
int[] arr = new int[total];
System.out.println("Enter the inputs :");
for(int i = 0;i
import java.util.Scanner;
public class Megna {
public static void main(String[] args) {
int[] number = new int[12];
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();
for (int i=1; i
Bro hhow to find the middle element in the array
//Table Problem Using User input//
import java.util.Scanner;
class hello{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.print("Enter Table No:");
int table = scan.nextInt();
for(int i=1;i
Middle element concept video is not exist kindly check that bro at 16:26
int result = arr[size/2];
print(result);
ithu middle element print pannum for odd number size
Bro middle element find and print video ila upload panuga
import java.util.Scanner;
class ex1{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.println("How much inputs you need to enter?");
int total = scan.nextInt();
int[] arr = new int[total];
System.out.println("Enter the inputs :");
for(int i = 0;i
@@-CA-SuthiV bro antha channel pathu kathukiga
@@sathishkraja2130 ithe channel tha bro..
How to find middle element in array?
Bro...how to find middle element
@PreethiSiva-gb3qs import java.util.Scanner;
class ex1{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.println("How much inputs you need to enter?");
int total = scan.nextInt();
int[] arr = new int[total];
System.out.println("Enter the inputs :");
for(int i = 0;i
Mid value didn't work
Bro array suthama puriyala confuse aagudhu again video potu soli kudunga
Yes bro..😢
import java. util. Scanner;
class HelloWorld {
public static void main(String[] args) {
Scanner scan= new Scanner(System.in);
int a= scan. nextInt();
for(int i=1; i
🤝
import java.lang.System;
import java.util.Scanner;
class hello
{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
int[] score = new int[10];
for(int i=0;i
user input table
import java.util.Scanner;
class hello{
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
System.out.println("Enter the number of table which you want=");
int table=scan.nextInt();
for(int i=1;i
package challenge4;
import java.util.Scanner;
// Get input for size of an array
// Get input for each element in an array
// Find the middle element in an array
public class q4 {
public static void main(String[] args) {
try (Scanner scan = new Scanner(System.in)) {
// Get the size of an array
System.out.print("Enter the size of an array:");
int size = scan.nextInt();
int[] arr = new int[size];
// Get the input for each element in an array
for (int i = 0; i
import java.util.Scanner;
class ForLoop {
public static void main(String[] args) {
int[] numbers =new int[10];
Scanner s = new Scanner(System.in);
for(int i =0;i
video last la how to find mid numer solala bro nega
bro 16:26 kaparm video run avala
import java.util.Scanner;
class ok
{
public static void main(String args[])
{
Scanner ajith=new Scanner(System.in);
int[] mark=new int[10];
int count=0;
for(int i=0;i
anna find middle element??????
Bro you didn't complete last question last part but I have completed it see this bro please
class one {
public static void main(String[] args) {
try (Scanner inputScanner = new Scanner(System.in)) {
System.out.println("Enter size of the array...");
int a = inputScanner.nextInt();
int[] num = new int[a];
for (int i = 0; i < a; i++) {
int b = inputScanner.nextInt();
num[i] = b;
}
if(a % 2 == 0){
int middle2 = a / 2 ;
int middle1 = middle2 - 1;
System.out.print("Middle Element : " + num[middle1] + ", " + num[middle2]);
}
else{
int middle1 = a / 2;
System.out.print("Middle Element : " + num[middle1]);
}
}
}
}
Idhuku output bro.
class one {
public static void main(String[] args) {
int[] num = {1,2,3,4,5,6,7,8,9,10};
for (int j = 0; j < 10; j++) {
System.out.print(num[j] + " ");
}
}
}
anna table coding la input get pani code poda sonegala adhu romba confusion ah iruku can you send me a code in comment?
Middle number solve pannala bro atleast caption poduinga bro
15:10
import java.util.*;
class Main{
public static void main(String args[]){
Scanner j=new Scanner(System.in);
int[] no=new int[10];
for(int i=0;i
Link not working
Bro pathi video illa ya
intha video laa find and middle element explain pannavey illa, i need that explaintation
@MUKESHS-n4p import java.util.Scanner;
class ex1{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.println("How much inputs you need to enter?");
int total = scan.nextInt();
int[] arr = new int[total];
System.out.println("Enter the inputs :");
for(int i = 0;i
Anna phyton ku scope illaiya
Question: to print tables for a number
import java.util.Scanner;
class qn18{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.println("Enter the number for which you want the table");
int num = scan.nextInt();
System.out.println("Enter the multiples upto which the table of the number needs to be printed");
int upto = scan.nextInt();
for(int i=1;i
Enna adhukulla video mudinjirchi.. middle element ah kanom
@neelag28 import java.util.Scanner;
class ex1{
public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.println("How much inputs you need to enter?");
int total = scan.nextInt();
int[] arr = new int[total];
System.out.println("Enter the inputs :");
for(int i = 0;i
import Java. Until. Scanner
Class hello {
Public static void main ( string args ( ) )
{
Scanner scan =new scanner ( system. In)
Int marks [ ] = scan next int (10) ;
For (int marks i= 0; i
public class hello {
public static void main(String[] args) {
Scanner a =new Scanner(System.in);
System.out.print("enter a Number:");
int num=a.nextInt();
for(int i=1;i
import java.util.Scanner;
class hi{
public static void main(String args[])
{
Scanner scan=new Scanner(System.in);
System.out.print("size:");
int size=scan.nextInt();
int a[]=new int[size];
for(int j=0;j
1st
import java.util.Scanner;
class HelloWorld
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
System.out.println("Enter Array Length");
int size = scan.nextInt();
int[] marks = new int[size];
int mid = size/2;
for(int i = 0; i < size; i++)
{
marks[i] = scan.nextInt();
}
System.out.println("The middle length number is:"+mid);
System.out.println(marks[mid]);
}
}
import java.util.Scanner;
class code{
public static void main(String args[])
{
Scanner object= new Scanner(System.in);
int o=object.nextInt();
for(int i=1;i