Chapter 6 Assignment 3
Chapter 6 Assignment 3
DEVELOPMENT
Assignment #03
Tahreem Rafaqat
Name
ID 223317
Semester 5th
num1 = parseInt(firstnum);
num2 = parseInt(Secondnum);
num3 = parseInt(Thirdnum);
if ( hour < 12 )
document.write( "<h1>Good Morning, " );
if ( hour >= 12 )
{
// convert to a 12-hour clock
hour = hour - 12;
if ( hour < 6 )
document.write( "<h1>Good Afternoon, " );
if ( hour >= 6 )
document.write( "<h1>Good Evening, " );
} // end if
document.writeln( name +
", welcome to JavaScript programming!</h1>" );
</script>
</head>
<body>
<p>Click Refresh (or Reload) to run this script again.</p>
</body>
</html>
Output: