Computer project - Copy
Computer project - Copy
void display ()
{
System.out.println("number “+num);
boolean f= check(num);
if(f==true)
System.out.println("Keprekar “+num);
else
System.out.println("not");
}
import java.util.*;
class abc
{
public static void main (String args [])
{
Scanner sc = new Scanner (System.in);
int M [] = new int [ 10];
int high, low, total_ marks = 0;
for (int j = 0; j < 10; j ++)
{
System.out.print("Enter marks for M ["+j+”] = “);
M[j] = sc. nextInt ();
}
high = M [0];
low = M [0];
for (int j=0; j < 10; j ++)
{
if(M[j] >high)
high=M[j];
else if(M[j]<low)
low=M[j];
total_marks = total_marks + M[j];
}
double avg = total_marks/10.0;
System.out.println("Output:\nHighest marks = "+high);
System.out.println("Lowest marks = " + low);
System.out.println("Average marks = " + avg);
}
}