University of Sydney_INFO1003_Foundamental of IT_2012 Semester 2
26/08/2012
Exercise: Input/Output Q2. What is the output of the following program: (say a= 2& b= 4)<script> var a= prompt(“Enter value a:”); var b= prompt(“Enter value b:”);Variable manipulation
INPUT
a= a * b; alert(“a is”+a);OUTPUT
</script>
19
Exercise: Input/Output Q.3 What is the output of the following program: (say c= 3& d= 4)<script> var c= prompt(“Enter prompt( Enter value c:”); c: ); c= c*1.0; var d= prompt(“Enter value d:”); d= d*1.0; c= c+ d; alert(“c is“+c);</script>
20