Write a java program to input marks of 5 student if 5 subject out of 100 marks each , output sum and percentage of marks and appropriate division i.e distigusion first class upto fail
Programe :
import java.util.*;
class Student
{
public static void main(String args[])
{
Scanner s = new Scanner(System.in);
int M , E , A , S , G , Total;float percentage ;
System.out.println("Enter the marks of 5 subject :");
M = s.nextInt();
E = s.nextInt();
A = s.nextInt();
S = s.nextInt();
G = s.nextInt();
Total = M + E + A + S + G ;
System.out.println("Total is : " +Total);
percentage = (Total * 100) /500;
System.out.println("Percentage is :" +percentage);
No comments:
Post a Comment