Language: C++

#include<algorithm>
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(void){
	int i,j,k,l,a,b,c,d,e,f,w=0,s=0,ax=1,ay=0;
	cin>>a>>b>>c>>d>>e>>f;
	int x[f+1][f+1],y[f+1][f+1];
	for(i=0;i<=f;i++){
		for(j=0;j<=f;j++){
			x[i][j]=a*100*i+b*100*j;
			y[i][j]=c*i+d*j;
          //if(x+y<=f&&x/100*e>=y&&100*y/(x+y)>100*ay/(ax+ay)){
          
		}
	}
  for(i=0;100*a*i<=f;i++){
    for(j=0;j*100*b<=f;j++){
      for(k=0;(double)(j*100*b+100*a*i)/100*e>=c*k;k++){
        for(l=0;(double)(j*100*b+100*a*i)/100*e>=d*l;l++){
          if((x[i][j]+y[k][l])!=0){
       
          if(x[i][j]+y[k][l]<=f&&(double)x[i][j]/100*e>=y[k][l]&&(double)100*y[k][l]/(x[i][j]+y[k][l])>(double)100*ay/(ax+ay)){
				ax=x[i][j];
            	ay=y[k][l];
			}
          }
			if(x+ay<=f&&(double)x/100*e>=ay&&(double)100*ay/(x+ay)>(double)100*ay/(ax+ay)){
				ax=x;
			}
          if(ax+y<=f&&(double)ax/100*e>=y&&(double)100*y/(ax+y)>(double)100*ay/(ax+ay)){
				ay=y;
			}
        }
      }
    }
  }
  
	cout<<ax+ay<<" "<<ay<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                         if(x+ay<=f&&(double)x/100*e>=ay&&(double)100*ay/(x+ay)>(double)100*ay/(ax+ay)){
      |                            ~~~~^~~
a.cc:28:37: error: invalid cast from type 'int (*)[(f + 1)]' to type 'double'
   28 |                         if(x+ay<=f&&(double)x/100*e>=ay&&(double)100*ay/(x+ay)>(double)100*ay/(ax+ay)){
      |                                     ^~~~~~~~~
a.cc:28:72: error: invalid operands of types 'double' and 'int (*)[(f + 1)]' to binary 'operator/'
   28 |                         if(x+ay<=f&&(double)x/100*e>=ay&&(double)100*ay/(x+ay)>(double)100*ay/(ax+ay)){
      |                                                          ~~~~~~~~~~~~~~^~~~~~~
      |                                                                     |     |
      |                                                                     |     int (*)[(f + 1)]
      |                                                                     double
a.cc:29:36: error: invalid conversion from 'int (*)[(f + 1)]' to 'int' [-fpermissive]
   29 |                                 ax=x;
      |                                    ^
      |                                    |
      |                                    int (*)[(f + 1)]
a.cc:31:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |           if(ax+y<=f&&(double)ax/100*e>=y&&(double)100*y/(ax+y)>(double)100*ay/(ax+ay)){
      |              ~~~~^~~
a.cc:31:39: error: invalid operands of types 'double' and 'int [(f + 1)][(f + 1)]' to binary 'operator>='
   31 |           if(ax+y<=f&&(double)ax/100*e>=y&&(double)100*y/(ax+y)>(double)100*ay/(ax+ay)){
      |                       ~~~~~~~~~~~~~~~~^~~
      |                                     |   |
      |                                     |   int [(f + 1)][(f + 1)]
      |                                     double
a.cc:31:55: error: invalid operands of types 'double' and 'int [(f + 1)][(f + 1)]' to binary 'operator*'
   31 |           if(ax+y<=f&&(double)ax/100*e>=y&&(double)100*y/(ax+y)>(double)100*ay/(ax+ay)){
      |                                            ~~~~~~~~~~~^~
      |                                            |           |
      |                                            double      int [(f + 1)][(f + 1)]
a.cc:32:36: error: invalid conversion from 'int (*)[(f + 1)]' to 'int' [-fpermissive]
   32 |                                 ay=y;
      |                                    ^
      |                                    |
      |                                    int (*)[(f + 1)]