0% found this document useful (0 votes)
3 views5 pages

Student Marks Input and Display Program

The document describes a Java program that manages student names and their marks across ten subjects using arrays. It allows users to input names and corresponding marks, and then searches for a specific student's name to display their marks. The program initializes arrays for names and marks, collects input from the user, and outputs the results based on the search query.

Uploaded by

Maitrey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Student Marks Input and Display Program

The document describes a Java program that manages student names and their marks across ten subjects using arrays. It allows users to input names and corresponding marks, and then searches for a specific student's name to display their marks. The program initializes arrays for names and marks, collects input from the user, and outputs the results based on the search query.

Uploaded by

Maitrey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Program 1

designer class using 11 Arrays of size 10 each. The first array contains
the names of students and the second movie story the marks of each
student in input the user. The names will be input random user .
Write a program to accept the names randomly by the user Hey and
search for the name in the first array and store the marks of 10
subjects entered by the user into the corresponding self of the other
line arrays. Display the content of both arrays at the end.

import [Link].*;
public class prg1
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
String ar1[]=new String[10];
int ar2[]=new int[10];
int ar3[]=new int[10];
int ar4[]=new int[10];
int ar5[]=new int[10];
int ar6[]=new int[10];
int ar7[]=new int[10];
int ar8[]=new int[10];
int ar9[]=new int[10];
int ar10[]=new int[10];
int ar11[]=new int[10];
int x=0 ; int y=0;
ar1[0]="Arundathi";
ar1[1]="Bruthi";
ar1[2]="Bhoomika";
ar1[3]="Manasvi";
ar1[4]="Madhushree";
ar1[5]="Meghana";
ar1[6]="Poorva";
ar1[7]="Nidhi";
ar1[8]="Anagha";
ar1[9]="Akshara";
[Link]("The order of names of students are:");
for(x=0 ; x<10 ; x++)
{
[Link](ar1[x]);
}
[Link]("Enter marks of each subject according to the
order mentioned:");
[Link]("Enter Physics marks:");
for(x=0; x<10 ; x++)
{
ar2[x]=[Link]();
}
[Link]("Enter History marks:");
for(x=0; x<10 ; x++)
{
ar3[x]=[Link]();
}
[Link]("Enter Geography marks:");
for(x=0; x<10 ; x++)
{
ar4[x]=[Link]();
}
[Link]("Enter English literature marks:");
for(x=0; x<10 ; x++)
{
ar5[x]=[Link]();
}
[Link]("Enter Computer Applications marks:");
for(x=0; x<10 ; x++)
{
ar6[x]=[Link]();
}
[Link]("Enter Mathematics marks:");
for(x=0; x<10 ; x++)
{
ar7[x]=[Link]();
}
[Link]("Enter 2nd Language marks:");
for(x=0; x<10 ; x++)
{
ar8[x]=[Link]();
}
[Link]("Enter Biology marks:");
for(x=0; x<10 ; x++)
{
ar9[x]=[Link]();
}
[Link]("Enter Chemistry marks:");
for(x=0; x<10 ; x++)
{
ar10[x]=[Link]();
}
[Link]("Enter English Language marks:");
for(x=0; x<10 ; x++)
{
ar11[x]=[Link]();
}
[Link]("Enter name of student ");
String st=[Link]();
for(y=0 ; y<10 ; y++)
{
int n=[Link](ar1[y]);
if(n==0)
{
[Link](ar1[y]);
[Link](ar2[y]);
[Link](ar3[y]);
[Link](ar4[y]);
[Link](ar5[y]);
[Link](ar6[y]);
[Link](ar7[y]);
[Link](ar8[y]);
[Link](ar9[y]);
[Link](ar10[y]);
[Link](ar11[y]);
break;
}
}
}
}

You might also like