Hello,
I want to implement the code on a project made in Autoplay Media Studio:
//Declare a multidimensional array to store the values.
//A struct would work better.
int sizes[][] = new int[10][2];
sizes[0][0] = 100000; //Minimal area size
sizes[0][1] = 0.00056; //Price per unit.
sizes[1][0] = 200000;
sizes[1][1] = 0.00061;
//Repeat for all values
//Calculate dimensions
int width = 200;
int height = 800;
int surface = width * height;
int foundArea;
while(int i < sizes.size(); i++)
{
//Check where the value belongs in the array
if(surface =< sizes[i][0])
{
foundArea = i;
break;
}
}
//Finally get the size
int price = sizes[foundArea][1] * surface;
The thing is, that i have alot of erros, and i don't know how to implement this code.
I want to do something like this, to implement on this project.
If someoane can help, it will be amazing! Thank you!
I want to implement the code on a project made in Autoplay Media Studio:
//Declare a multidimensional array to store the values.
//A struct would work better.
int sizes[][] = new int[10][2];
sizes[0][0] = 100000; //Minimal area size
sizes[0][1] = 0.00056; //Price per unit.
sizes[1][0] = 200000;
sizes[1][1] = 0.00061;
//Repeat for all values
//Calculate dimensions
int width = 200;
int height = 800;
int surface = width * height;
int foundArea;
while(int i < sizes.size(); i++)
{
//Check where the value belongs in the array
if(surface =< sizes[i][0])
{
foundArea = i;
break;
}
}
//Finally get the size
int price = sizes[foundArea][1] * surface;
The thing is, that i have alot of erros, and i don't know how to implement this code.
I want to do something like this, to implement on this project.
If someoane can help, it will be amazing! Thank you!
Comment