html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script>
var count=0;
var number = 1;
var total = 0;
while (number !=-1)
{
count++;
document.write(number + "<br>");
number = parseInt(prompt("Enter product price please: "));
total = total + count;
}
document.write("The total price of products = £" + total + "<br>");
document.write("The total products entered is " + count);
</script>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
body {
}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run