0% found this document useful (0 votes)
8 views2 pages

Exp 6

it is big data

Uploaded by

Abhishek Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Exp 6

it is big data

Uploaded by

Abhishek Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

EXPERIMENT NUMBER – 06

AIM: To develop a MapReduce program to find the grades of students.

import java.util.Scanner;
public class Main{
public static void main(String args[]){
int marks[] = new int [6];
int i;
float total = 0, avg;
Scanner scanner = new Scanner (System.in);
for(i=0; i<6; i++) {
System.out.print("Enter Marks of Subject " + (i + 1) + ":");
marks[i] = scanner.nextInt();
total = total + marks[i];
}
scanner.close();
avg = total/6;
System.out.print("The student grade is: ");
if (avg>=80)
System.out.println("A");
else if (avg>=60 && avg<80)
System.out.println("B");
else if(avg>=40 && avg<60)
System.out.println("C");
else
System.out.println("D");
}
}

You might also like