Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let input = [
- 3,
- 26.66,
- 18,
- 13.5
- ];
- let print = this.print || console.log;
- let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
- let items = +gets();
- let priceOfItem = '';
- let discounted ='';
- let discount = '';
- let revised = '';
- for(i=1 ; i<= items ; i++){
- priceOfItem=gets();
- discount = ((priceOfItem/100)*65);
- discount.toFixed(4);
- discounted = (priceOfItem - discount)*100;
- revised = Math.round(discounted.toFixed(2) );
- print((revised/100 ).toFixed(2));
- }
Add Comment
Please, Sign In to add comment