Computer Science, asked by roypritam55555, 8 months ago

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 Snehpriyanshu
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 imtiyazallam
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