1 00:00:00,630 --> 00:00:04,530 In this lesson we'll explore a few other arithmetic operators. 2 00:00:04,740 --> 00:00:07,930 We'll begin with division in this example. 3 00:00:07,950 --> 00:00:10,080 We'll divide two values together 4 00:00:12,920 --> 00:00:17,500 we'll start by declaring a variable we'll call the D. 5 00:00:17,510 --> 00:00:30,590 The value of D will be one hundred divided by 50. 6 00:00:30,640 --> 00:00:36,250 Next we'll set up our output we'll call the I.D. Div I 7 00:00:40,850 --> 00:00:49,670 and we'll set up a paragraph in our body tag to display the output and once we save our file we'll go 8 00:00:49,670 --> 00:01:02,530 ahead and preview it in our web browser and we can see that the correct value is output ID. 9 00:01:02,870 --> 00:01:08,240 Next will increment the value of variable. 10 00:01:08,240 --> 00:01:15,630 So we do that for this example will we'll go ahead and declare about a variable called X. And give it 11 00:01:15,630 --> 00:01:16,730 the value of five 12 00:01:19,660 --> 00:01:29,290 next type in x plus plus and a semicolon. 13 00:01:29,330 --> 00:01:42,990 This will increment the value of X by 1 so if X equals 5 the next value up would be 6 will store the 14 00:01:42,990 --> 00:01:45,810 incremented value in a variable called Z 15 00:01:50,650 --> 00:02:12,680 and then we'll go ahead and set up our output. 16 00:02:12,740 --> 00:02:14,190 Now we'll go ahead and save the file 17 00:02:16,910 --> 00:02:30,160 and refresh our web browser and we can see the value 6 output it below our last calculation. 18 00:02:30,250 --> 00:02:34,240 We can also decrement the value of a variable. 19 00:02:34,240 --> 00:02:42,630 So instead of going up this time we'll set up a calculation so our union arithmetic that decreases the 20 00:02:42,630 --> 00:02:44,500 value of the variable. 21 00:02:44,520 --> 00:02:47,910 So instead of going from five to six we'll go from five to four 22 00:02:52,470 --> 00:02:57,210 set up a new variable and we'll call this variable H 23 00:03:00,640 --> 00:03:12,570 next type in H minus minus and the semicolon will store the new value in a variable called K and set 24 00:03:12,580 --> 00:03:13,270 up our output 25 00:03:28,810 --> 00:03:39,820 o save our file and refresh our web browser and we can see that the value of k is output.