import java.util.Scanner;
public class Program_2 {
public static void main(String[] args) {
int marks[] = new int[7];
int total = 0;
float percentage = 0;
Scanner scan = new Scanner(System.in);
for (int i = 1; i <= 6; i++) {
marks[i] = scan.nextInt();
}
for (int i = 1; i <= 6; i++) {
total = total + marks[i];
}
percentage = (total * 100) / 600;
System.out.println("Students percentage = " + percentage);
}
}
Find all the practical at one place of Gujarat Technological University(GTU) With Solutions.
Tuesday, September 18, 2018
Write a program that calculate percentage marks of the student if marks of 6 subjects are given.
Subscribe to:
Post Comments (Atom)
-
A country has a capital city A dining philosopher uses a fork A file is an ordinary file or a directory file Files cont...
-
import java.io.*; public class Dataio { public static void main(String args[]) throws IOException { DataInputStr...
No comments:
Post a Comment