I need to finish this assignment:
-Use prompt dialog boxes for input.
-Get the user.s name.
-Get a 3 digit integer value from the user and convert it into an integer with the parseInt method.
-Calculate the number of hundreds in the integer.
-Calculate the number of tens in the integer.
-Calculate the number of ones in the integer.
-Output Programmed by Your Name, the user.s name, the number input and the number of hundreds, tens, and ones in the number. Use one line for each and be sure to label your output clearly.
This is what I've come up with so far, but I can't figure out the Calculate part of the code:
<title>Lab Assignment #4 CIS 111</title>
name = window.prompt( "Please Enter Your Name:" );
integer = window.prompt( "Please A Three Digit Integer:" );
integer = parseInt( integer );
document.writeln( "<h1>This Was Programmed by Gerson Flores. The User's Name Is, " + name +
", The Three Digit Integer Entered By User Is: " + integer + "</h1>" );
<p>Click Refresh (or Reload) to run this script again.</p>
Any Help will be much appreciated!! Thanks!!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)