PROGRAM TO FIND ARMSTRONG NUMBER – JAVA

//PROGRAM TO FIND ARMSTRONG NUMBER class Armstrong { public static void main(String a[]) { int n=156,i=n,r,sum=0; while(i>0) { r=i%10; sum+=r*r*r; i=i/10; } if(n==sum) System.out.println(“the number is Armstrong”); else System.out.println(“the number …

program to calculate grade of the student – java

//program to calculate grade of the student. class Grade { public static void main(String ar[]) { int max=100,t=0; float a=82,b=71,c=76,sum=0,per=0; if((a>max)||(b>max)||(c>max)) System.out.println(“\n\t!!Wrong data !!\nThe obtained marks should not exceed the …