top of page

Forum Comments

I Have No Forum Comments Yet
Check back soon.
R

rumia6727

More actions
bottom of page
//t the user for the required inputs var costOfProbe = parseFloat(prompt("Enter the cost of the probe:")); var costSavingsPerHour = parseFloat(prompt("Enter the cost savings per hour:")); var hoursSavedPerWeek = parseFloat(prompt("Enter the number of hours saved per week:")); var weeksPerYear = parseFloat(prompt("Enter the number of weeks the machine is in use per year:")); // Calculate the ROI var annualCostSavings = costSavingsPerHour * hoursSavedPerWeek * weeksPerYear; var roi = (annualCostSavings / costOfProbe) * 100; // Display the results document.write("By using a probe, you can save $" + annualCostSavings + " per year."); document.write("Your ROI for purchasing the probe is " + roi + "%.");