answersLogoWhite

0


Best Answer

import java.io.*;

class summ

{

public static void main()throws IOException

{

BufferedReader in=new BufferedReader(new InputStreamReader(System.in));

int a[]=new int[10];

int sum=0;

float avg=0;

for(int i=0;i<10;i++)

{

System.out.println("Enter marks of student "+(i+1)+" : ");

a[i]=Integer.parseInt(in.readLine());

sum+=a[i];

avg=sum;

}

avg/=10;

System.out.print("Sum= "+sum+"\nAverage= "+avg);

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a java program to find the sum and average score of three marks scored by ten students?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


How do you write a program in C that will captures details The details to be captured are student name mark and age The program should calculate and display the average marks for all the students?

Create a data structure to store the details for each student: typedef struct student_t { char name[30]; unsigned age; unsigned mark; } student; Establish an array to store the student data: size_t max = 100; // replace 100 with the actual number of students student students[max]; Use a loop to enter the data: for (size_t i=0; i&lt;max; ++i) { printf ("Student name: "); scanf ("%s", students[i].name); printf ("Student age: "); scanf ("%u", students[i].age); printf ("Student mark: "); scanf ("%u", students[i].mark); } Calculate and display the average mark: unsigned sum = 0; for (size_t i=0; i&lt;max; ++i) sum += student[i].mark; printf ("Average mark: %d\n", sum / max_students);


What is the expected rank by getting 41 marks in gate 2011 ec?

not sure but this sure that the rank is certainly gonna be more than the one who has scored 40 marks :)


What is the C plus plus program to illustrate multiple inheritance for read and display student details with 3 test marks and average?

You can show multiple inheritance by inheriting student details like name ,Admission number ,Parents name, address and other information from a school class and then also inherit his marks detail from the his Class's class like Grade 3rd . You will get his marks information from there. Then go forward and make functions to calculate the average marks and display the details.


How do you execute a program in cmd with space?

Surround the name of the program in quotation marks, such as: "C:\Program Files (x86)\Programmer's Notepad\pn.exe".

Related questions

Write a C program to read the internal test marks of 25 students in a class and show the number of students who have scored more than 50 percent in the test. Make necessary assumptions?

Write a C program to read the internal test marks of 25 students in a class and show the number of students who have scored more than 50% in the test. Make necessary assumptions


What is the median of marks scored by 8 students if there marks were 46 83 13 04 15 28 30 and 34?

The median is 29.


Find average of marks of 5 students?

total marks divided by number of subjects


Question paper of aptitute exam for engineering student?

Four engineering students E1, E2, E3 and E4 attempted their semester exams and their relative scores in Electronics, Computer Science, Mathematics and Communication is as follows: Electronics =&gt; E1&gt; E2&gt; E3&gt; E4 Computer Science =&gt; E2&gt; E4&gt; E3&gt; E1 Mathematics =&gt; E3&gt; E1&gt; E4&gt; E2 Communication =&gt; E4&gt; E2&gt; E1&gt; E3 The total marks for each of the tests was 100. It was also found that all students' scores were whole numbers and none scored marks less than 40. In addition, nobody scored the same marks in two subjects. The average marks scored by the four students were 70, 80, 60 and 80 respectively. 1. The total marks scored (all subjects inclusive) by E1 was ____? a) 200 b) 280 c) 320 d) 360


Will you are able to get sgsits indore you have secured 57 marks in mppet 2009 and 40 marks in aieee 2009?

no because i got 119 marks in mppet and according to last year's opening and closing ranks i don't think students with this less marks get sgsits. the college excepts students who have scored really high marks.


How do make 10student name and his remarks in q-basic?

' '*** PROGRAM: Collecting student data: names/marks. ' '*** Create 2 array variables to store each students name/marks... DIM students$(10), marks$(10) '*** SCREEN ONE/Collect the data... CLS '...(CL)ear the Output (S)creen '*** print heading... PRINT "PROGRAM: Collecting each student names/marks..." PRINT '*** A FOR/NEXT loop is used to collect each individual students data... FOR eachStudentNo% = 1 TO 10 '*** Get each students names/marks 'by typing these values in from the keyboard.... PRINT eachStudentNo%; "&gt;" INPUT " Enter student name"; students$(eachStudentNo%) INPUT "Enter student marks"; marks$(eachStudentNo%) NEXT '*** SCREEN TWO: Output the collected data... CLS '...(CL)ear the Output (S)creen '*** Print headings... PRINT "Student No.", "Student Name", "Student Marks" PRINT '*** FOR/NEXT loop is used to print out the 2 array student 'name/marks' values... FOR eachStudentNo% = 1 TO 10 '*** print out each students 'number/name/mark' values... PRINT eachStudentNo%, PRINT students$(eachStudentNo%), PRINT marks$(eachStudentNo%) NEXT END '...END of program/halt program code execution


Which school marks do you need to be successful in a degree program?

It depends from school to school. However, upon successful completion of the teacher preparation program and the passing of all required certification tests, students will be recommended for degree program.


What is the aggregate of marks you have scored in 4 years?

56


Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


Who has scored highest marks in SSC-1 2009?

Who gain highest marks in s.s.c.1 examination


Should students study by themselves or with their moms or dads?

Sometimes dont need to with parents, Just get a better or average marks is okay.


How do you know the grading system?

grading system is an advantage to the weak students and well as for those students who got just one mark above which changes their grade. If a student has scored 91 marks he will got A1 and a student got 99 he will also got A1.so,disadvantage is also there for stutents who got very good marks in that subject.