Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
InputOutput.html 623 B
<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<title>Input/Output</title>
</head>

<body>
	<script>
		"use strict";

		document.writeln("<strong>" + "Bill Calculation System</strong><br />");

		let costPerCredit, numberOfCredits, tuitionCost;

		/* Reading values from the user */
		costPerCredit = Number(prompt("Enter cost per credit:"));
		numberOfCredits = prompt("Enter number of credits:", 15);

		/* Computing cost */
		tuitionCost = costPerCredit * numberOfCredits;

		document.writeln("<strong>Tuition Cost: </strong>" + tuitionCost);
	</script>
</body>

</html>