I need to automate the below code snippet using loops. I need to get the max values even if the availpoints reaches infinite numbers
How can i achieve it within few lines of codes
if (availPoints < 500 ) {
pointsMax = 500;
MoneyMax = 25;
}
else if (availPoints < 1000 ) {
pointsMax = 1000;
MoneyMax = 50;
}
else if (availPoints < 1500 ) {
pointsMax = 1500;
MoneyMax = 75;
}
Aucun commentaire:
Enregistrer un commentaire