answersLogoWhite

0


Best Answer

import TerminalIO.*;

public class nn8{

public static void main(String[] args){

KeyboardReader reader=new KeyboardReader();

System.out.println("Enter your ages");

int x,y=0;

x=reader.readInt();

for(int i=1;i<=20;x=i)

y=x+i;

System.out.println("the sum is" +y);

}

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a Java program that ask to input 20 students age in a class and gives the average age of given inputs?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to find the grade obtained by the students of a class using structure?

Write a program to find the grade obtained by the students of a class


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


Write a program which reads names of students and their telephones from a file and produce a linked list ordered in alphabetical order by the surname of the student?

write a program which reads names of students and their telephones from a file and produce a linked list ordered in alphabetical order by the surname of the student.


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


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


How can write a c program to store students record in a file?

Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo,


Write a program that accepts as inputs the edges of a graph and then draws the graph using a computer graphics display?

hey i m going to give a program that accepts edges a input and then it draws the graph using a computer graphics display...


How do you write the average n numbers program in c language?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you. no i am asking to verify my answer


Do students like to write?

Yes students do like to write.


How do you write a c program that computes results of 10 students for any given 4 subjects grading their results from a A to U?

ghfj


What to write on my daughter's first year of dance for program book?

Write her name, age , place of the recital , what dance and to what music she performed, and the names of any students that accompanied her in the performance.


Write a program in c to sort the details of 10 students using the structure?

for(i = 0; i &lt; num_students; i ++){ sort(student[i]); } That's what you get when you're that specific!