Arithmetic operators in javascript || codeandman
hey guys how are you all today in this post I am going to give you the source code of my video called "arithmetic operators in JavaScript " so let's begin :
here's the complete Source Code written in the video:-
// var num1 = 2
// var num2 = 4
// console.log("The first number is",num1,"and the second number is",num2)
// console.log("The result of adding two numbers is ", num1+num2)
// console.log("The result of subtracting two numbers is ", num2-num1)
// console.log("The result of multiplying two numbers is ", num1*num2)
// console.log("The result of divinding two numbers is ", num2/num1)
// ---------------------------------------------------------------------
// Creation of the project
a = parseInt(prompt("Enter the first number:"));
b = parseInt(prompt("Enter the Second Number:"));
document.write("<em>If you divide the two numbers then the result is ",b/a," and the
product of two numbers is ",a*b," and the additon of two numbers is ",a+b," and
subtract of two numbers is ",b-a,"</em>")
I hope that you liked this post.
Like share and subscribe to the video and channel.
Thank You.
Comments
Post a Comment