Computer Science, asked by 1704581, 5 months ago

write a program in c to find the sum of energy of two chemicals which produces maximum energy on reaction​

Answers

Answered by Vaishnavi411566
0

Answer:

When a chemical reaction occurs, bonds in the reactants break, while new bonds form in the product. The following example explains this. Hydrogen reacts with oxygen to form water, according to the following equation:

\[2\text{H}_{2}\text{(g)} + \text{O}_{2}\text{(g)} → 2\text{H}_{2}\text{O}\text{(g)}\]

In this reaction, the bond between the two hydrogen atoms in the \(\text{H}_{2}\) molecule will break, as will the bond between the oxygen atoms in the \(\text{O}_{2}\) molecule. New bonds will form between the two hydrogen atoms and the single oxygen atom in the water molecule that is formed as the product.

For bonds to break, energy must be absorbed. When new bonds form, energy is released. The energy that is needed to break a bond is called the bond energy or bond dissociation energy. Bond energies are measured in units of \(\text{kJ·mol$^{-1}$}\).

Explanation:

Follow me and mark me as a Brainliest .

Answered by azitabience
1

Answer:

import java.util.*;

public class energy {

   public static void main(String[] args) {

      int temp,max,second_max;

      Scanner s = new Scanner (System.in);

      System.out.println("Enter the number of chemicals");

      int number = s.nextInt();

      int arr[] = new int[number];

      System.out.println("Enter the energies of chemicals");

      for(int i=0;i<number;i++) {

       arr[i] = s.nextInt();

      }

      max = arr[0];

      second_max = arr[0];

      for(int i=0;i<number;i++) {

       if(arr[i]>max) {

           second_max = max;

           max = arr[i];

       }

       else if(arr[i]>second_max) {

           second_max = arr[i];

       }

    }

   System.out.println(max + second_max);

   }

}

Similar questions