/*
* The annual examination results of 50 students in a class is tabulated as follows:
* Roll no. Subject A Subject B Subject C
* ...... ....... ....... .......
*
* Write a program to read the data, calculate & display the following:
* a) Average marks obtained by each student
* b) Print the roll no. & average marks of the students whose average mark is above 80
* c) Print the roll no & average marks of the students whose average marks is below 40
*/
import java.io.*;public class questionNINE2009
{
public static void main(String args[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int roll[]=new int[50];
int marksA[]=new int[50];
int marksB[]=new int[50];
int marksC[]=new int[50];
float avg[]=new float[50];
int i,j;
for(i=1; i<=50; i++)
{
System.out.println("Enter roll number of the student");
roll[i]=Integer.parseInt(br.readLine());
System.out.println("Enter marks of the student in Subject A");
marksA[i]=Integer.parseInt(br.readLine());
System.out.println("Enter marks of the student in Subject B");
marksB[i]=Integer.parseInt(br.readLine());
System.out.println("Enter marks of the student in Subject C");
marksC[i]=Integer.parseInt(br.readLine());
avg[i]=(marksA[i]+marksB[i]+marksC[i])/3;
}
System.out.println("----------------------------------RESULT----------------------------------------------");
System.out.println("Roll no. \t Subject A \t Subject B \t Subject C \t Average ");
for(j=1; j<=50; j++)
{
System.out.println(roll[j] +"\t \t" + marksA[j] +"\t \t" + marksB[j] +"\t \t" + marksC[j] +"\t \t" + avg[j] );
}
System.out.println("\n roll no. & average marks of the students whose average mark is above 80");
System.out.println("Roll no. \t Average ");
for(j=1; j<=50; j++)
{
if(avg[j]>80)
System.out.println(roll[j] +"\t \t" + avg[j]);
else
System.out.println("N.A. \t \t N.A.");
}
System.out.println("\n roll no. & average marks of the students whose average mark is below 40 ");
System.out.println("Roll no. \t Average ");
for(j=1; j<=50; j++)
{
if(avg[j]<40)
System.out.println(roll[j] +"\t \t" + avg[j] );
else
System.out.println("N.A. \t \t N.A.");
}
}
}
Thnx
ReplyDeleteyour program is full of errors
ReplyDeleteyour program is full of errors
ReplyDeleteMention the errors pls
DeleteFull of errors don't know then why u r giving students may face problem������
ReplyDeleteThis program is worthless
ReplyDeleteoii what ever is ur name
ReplyDeletenever upload wrong programs
if we don't know anything we come to google, if the google is wrong what should we do
The ICSE board is one of the most popular boards in India and students who belong to the Icse board are very lucky. Because of the covid crisis, many students have been not concentrated on their studies, and Now they are worried about their exam then don't fear because Ziyyara is here for Helping You.
ReplyDeleteVisit On:- icse online tuition
Phone no - +91-9654271931
Thank You and I have a super offer: When To Renovate House renovations to increase home value
ReplyDelete