-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJava.js
More file actions
47 lines (37 loc) · 1014 Bytes
/
Java.js
File metadata and controls
47 lines (37 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
var app = angular.module('Java', [])
app.controller('java1', function($scope, $http)
{
var count=0;
$scope.sub= function()
{
count=0;
$scope.Answer1 = document.getElementById("answer1").value;
if ($scope.Answer1=="System.out.println")
{
console.log("Correct!")
count = count+1;
}
else
{
console.log("Try Again")
}
$scope.Answer2 = document.getElementById("answer2").value;
if ($scope.Answer2=="x%2!=0"||$scope.Answer2=="x%2==1")
{
count=count+1;
}
else
{
}
$scope.Answer3 = document.getElementById("answer3").value;
if($scope.Answer3=="int i=0;i<10;i++")
{
count=count+1;
}
else
{
}
document.getElementById("display4").innerHTML = "Your Score is"+count+"/3";
console.log(count+"/3")
}
});