Computer Science, asked by Anonymous, 2 months ago

Write a program in Java​

Attachments:

Answers

Answered by Anonymous
9

Answer:

India was the largest producer of cotton textiles when the British gained power in Bengal around 1750.

Indian textile was famous for its quality and craftsmanship. Chintz, cossaes orkhassa and bandanna were the different types of cotton cloths imported. The wealthy people of England, including the Queen herself, wore clothes made in India.

The Calico Act, enacted in 1720, was advantageous to the English producers as the use of chintz was banned in England.

The development of cotton Industries in Britain affected textile producers in India.

By the beginning of the 19th century, Indian goods were ousted from their traditional markets in Africa, America and Europe. Thousands of spinners and weavers lost their livelihood in India.

New centres of weaving like Sholapur in western India and Madura in South India emerged in India.

The first cotton mill came up in India in 1854 in Bombay.

Answered by anindyaadhikari13
3

Required Answer:-

Question:

  • Write a program in Java to accept the marks obtained in three subjects by a student. Calculate and print his average marks. Print the grade as per conditions given.

Solution:

Here comes the program.

import java.util.*;

public class Marks {

 public static void main(String[] args) {

   double a, b, c, av;

   Scanner sc=new Scanner(System.in);

   System.out.print("Enter Marks in First Subject: ");

   a=sc.nextDouble();

   System.out.print("Enter Marks in Second Subject: ");

   b=sc.nextDouble();

   System.out.print("Enter Marks in Third Subject: ");

   c=sc.nextDouble();

   av=(a+b+c)/3.0;

   System.out.println("Average Marks: "+av);

   char g;

   if(av>=80 && av<=100)

     g='A';

   else if(av>=60)

     g='B';

   else if(av>=50)

     g='C';

   else

     g='D';

     System.out.println("Grade: "+g);

   sc.close();

 }

}

Explanation:

  • We will ask the student to enter his/her marks in three subject. Then, we will calculate the average marks obtained. As per the conditions given, grade is calculated.

Refer to the attachment ☑.

Attachments:
Similar questions