Computer Science, asked by Vaishnavidevikandima, 9 months ago

Imagine you are a martial arts fighter fighting with fellow martial artists to win prize money. However unlike traditional competitions, here you have the opportunity to pick and choose your opponent to maximize your prize kitty. The rules of maximization of prize kitty are as follows

Answers

Answered by Rithwick07
1

Answer:

The contestant must be the same age as yourself

The contestant must have the same weight as you

Answered by ksrihari10
1

#include<stdio.h>

int main()

{

 int n,i;

 int sum=0;

 scanf("%d",&n);

   int arr[n-1];

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

   {

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

   }

if(n<3)

{

  if(n==0)

  {

    sum=0;

  }

  else if(n==1)

     {

       sum=a[0];

     }

     else

     {

       sum=sum+(arr[0]*arr[1]);

       arr[0]=arr[1];

       arr[1]='\0';

       sum=sum+arr[0];

     }

 print(sum);

     }

Similar questions