Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

Finding largest value from the list of values

$
0
0

Hello All,

I have a scenario .. where i need to capture all the rate card data and find the largest value (Select) and move to next page.

To find all the list of values i did correlation .. ord=all,i could see all the list of values in correlation parameter function.

Below is code where im facing an issue.

Please help me where im wrong.. 

//initilization

char arr[10];
int y[100][100];
int location=1, maximum;

//Storing values in array

n= atoi(lr_eval_string("{Correlation1_count}"));

for(i=1;i<=n;i++)
{
sprintf(arr,"{Correlation1_%d}",i);
sprintf(y[i],"%d",atoi(lr_eval_String(arr)));
}

//finding highest value from array
maximum = atoi(lr_eval_string(y[1]));

for(i=1;i<=n;i++)
{
if (y[i]>maximum)
{
maximum= y[i];
location =i+1;
}
}

 Thanks in advance.!!!!

Regards,

sai


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>