WRITE A PROGRAM TO FIND CGPA OF 50 STUDENTS WITH THERE RESPECTIVE UNITS COURSE

import java.util.*;
import java.util.Scanner;
public class gp{
public static void main(String[] args) {
String matric="";
int i;
for(i=0;i<50;i++){
> double sum,units,gp;
int com111, com112, com113, com114, sta111, sta112, mth111, mth112,otm111;
Scanner input=new Scanner(System.in);
System.out.println( "Enter MATRIC NO");
matric=input.next();
System.out.println( "Enter COM111 Score");
com111=input.nextInt();
System.out.println( "Enter COM112 Score");
com112=input.nextInt();
System.out.println( "Enter COM113 Score");
com113=input.nextInt();
System.out.println( "Enter COM114 Score");
com114=input.nextInt();
System.out.println( "Enter STA111 Score");
sta111=input.nextInt();
System.out.println( "Enter STA112 Score");
sta112=input.nextInt();
System.out.println( "Enter MTH111 Score");
mth111=input.nextInt();
System.out.println( "Enter MTH112 Score");
mth112=input.nextInt();
System.out.println( "Enter OTM111 Score");
otm111=input.nextInt();
System.out.println( "MATRIC NO : ND/14/COM/FT/"+matric);
if( com111 <=39){
com111=0;
System.out.println("c.o com111");
} if (com111 >=40 & com111 <=49){
com111=1 * 2;
} if (com111 >= 50 & com111 <=59){
com111=2*2;
} if (com111 >= 60 & com111 <=74){
com111=3*2;
} if (com111 >= 75 & com111 <=100){
com111=4*2;
} if( com112 <=39){
com112=0;
System.out.println("c.o com112");
} if (com112 >=40 & com112 <=49){
com112=1 * 4; } if (com112 >= 50 & com112 <=59){
com112=2*4;
} if (com112 >= 60 & com112 <=74){
com112=3*4;
} if (com112 >= 75 & com112 <=100){
com112=4*4;
} if( com113 <=39){
com113=0;
System.out.println("c.o com113");
} if (com113 >=40 & com113 <=49){
com113=1 * 3;
} if (com113 >= 50 & com113 <=59){
com113=2*3;
} if (com113 >= 60 & com113 <=74){
com113=3*3;
} if (com113 >= 75 & com113 <=100){
com113=4*3;
} if( com114 <=39){
com114=0;
System.out.println("c.o com114");
} if (com114 >=40 & com114 <=49){
com114=1 * 3;
} if (com114 >= 50 & com114 <=59){
com114=2*3;
} if (com114 >= 60 & com114 <=74){
com114=3*3; } if (com114 >= 75 & com114 <=100){
com114=4*3; } if( sta111 <=39){
sta111=0;
System.out.println("c.o sta111");
} if (sta111 >=40 & sta111 <=49){
sta111=1 * 2;
} if (sta111 >= 50 & sta111 <=59){
sta111=2*2;
} if (sta111 >= 60 & sta111 <=74){
sta111=3*2;
} if (sta111 >= 75 & sta111 <=100){
sta111=4*2;
} if( sta112 <=39){
sta112=0; System.out.println("c.o sta112");
} if (sta112 >=40 & sta112 <=49){
sta112=1 * 3;
} if (sta112 >= 50 & sta112 <=59){
sta112=2*3;
} if (sta112 >= 60 & sta112 <=74)
{ sta112=3*3;
} if (sta112 >= 75 & sta112 <=100){
sta112=4*3;
} if( mth111 <=39){
mth111=0;
System.out.println("c.o mth111");
} if (mth111 >=40 & mth111 <=49){
mth111=1 * 2;
} if (mth111 >= 50 & mth111 <=59){
mth111=2*2;
} if (mth111 >= 60 & mth111 <=74){
mth111=3*2;
} if (mth111 >= 75 & mth111 <=100){
mth111=4*2;
} if( mth112 <=39){
mth112=0;
System.out.println("c.o mth112");
} if (mth112 >=40 & mth112 <=49){
mth112=1 * 2;
} if (mth112 >= 50 & mth112 <=59){
mth112=2*2;
} if (mth112 >= 60 & mth112 <=74){
mth112=3*2;
} if (mth112 >= 75 & mth112 <=100){
mth112=4*2;
} if( otm111 <=39){
otm111=0;
System.out.println("c.o otm111");
} if (otm111 >=40 & otm111 <=49){
otm111=1 * 4;
} if (otm111 >= 50 & otm111 <=59){
otm111=2*4;
} if (otm111 >= 60 & otm111 <=74){
otm111=3*4;
} if (otm111 >= 75 & otm111 <=100){
otm111=4*4;
} sum = com111+com112+com113+com114+sta111+sta112+mth111+mth112+otm111;
units=25;
gp= sum/units;
if(gp <=1.49){V System.out.println( gp +" withdraw");
} if(gp >=1.50 & gp <=1.99){
System.out.println( gp +" repeat");
} if(gp >=2.00 & gp <=2.49){
System.out.println( gp +" pass");
} if(gp >=2.50 & gp <=2.99){
System.out.println( gp +" lower credit");
} if(gp >=3.00 & gp <=3.49){
System.out.println( gp +" upper credit");
} if(gp >=3.50 & gp <=4.00){
System.out.println( gp +" Distinction");
} } } }

Comments

Popular posts from this blog

IT Terminology

200 Keyboard Shortcuts (Windows) to Boost Your Productivity

Things Everyone Should Know How To Do