Computer Science, asked by swaroopa1097, 7 months ago

a nin empty array A consisting of N numeric values is given.the product of quadruplet(p,q,r,s) equates to A[p]*A[q]*A[r]*A[s] site:brainly.in​

Answers

Answered by ayush8a12
0

Answer:

this is a question of which subject

Answered by shraboniroy120
1

Answer:

#include <stdio.h>

   void main ()

   {

       int number[30];

       int i, j, a, n;

       printf("Enter the value of N\n");

       scanf("%d", &n);

       printf("Enter the numbers \n");

       for (i = 0; i < n; ++i)

        scanf("%d", &number[i]);

       /*  sorting begins ... */

       for (i = 0; i < n; ++i)

       {

           for (j = i + 1; j < n; ++j)

           {

               if (number[i] < number[j])

               {

                   a = number[i];

                   number[i] = number[j];

                   number[j] = a;

               }

           }

       }

       if(n<3){

           printf("Wrong");

       }else

       {

           printf("The numbers arranged in descending order are given below\n");

       int sum=1;

       for (i = 0; i < n; ++i)

       {

           sum=number[i]*sum;

       }

       printf("%d",sum);

       }

   }

Explanation:

Similar questions