Computer Science, asked by shemoypanchakoti, 4 months ago

wap in java to accept Roll: no,class and 5 subject marks and find the total and average marks and display them​

Answers

Answered by anjaliqueen3108
2

Answer:

import java.util.*;

public class abc

{

public static vod main ()

{

Scanner in = new Scanner (System.in);

int roll, class,marks ;

int i,sum=0, avg;

System.out.println(" enter the roll no");

roll= in.nextInt();

System.out.println(" enter the class");

class= in.nextInt();

for (I= 1; i<=5;i++)

System.out.println(" enter the mark ");

marks= in.nextInt();

sum=( sum+marks);

avg =( sum/500);

System.out.println(" total marks="+ sum);

System.out.println(" average marks="+ avg);

}

}

Similar questions