t. Write a
program in Java to input the tatal
student strength in a school, then calculate
and display the number of girls students in
a school where the number of girls students
is 39% of total
of total students strength.
s
Answers
Answered by
5
Explanation:
Enter the number of subjects and then enter marks if students in all those subjects. Now we us for loop to calculate total marks of the student and hence divide it.
Answered by
2
Answer:
import java.util.*;
public class Test {
public static void main(String args[]) {
int total,girls;
Scanner sc = new Scanner(System.in);
System.out.print("Enter the total numbers of students: ");
total = sc.nextInt();
girls = (int) Math.round(39.0 / 100 * total);
System.out.println("Total strength of the class is " + total);
System.out.println("Total number of girls are " + girls);
}
}
Similar questions
English,
4 months ago
Computer Science,
4 months ago
Social Sciences,
4 months ago
English,
8 months ago
Chemistry,
8 months ago
Math,
1 year ago