Prog 5
Prog 5
<head>
<script src="angular.min.js"></script>
<style type="text/css">
marquee{
color:aqua;
font-size: 30px;
}
h1{
font-size: 30px;
}
p{
color:white;
font-size: 20px;
}
input{
color:black;
font-size:20px;
}
</style>
</head>
<body bgcolor="red" ng-controller="ctrl">
<center>
<marquee scrollamount="10">Welcome to the Dept</marquee>
<h1>Calculator Using HTML and CSS with Angular JS </h1>
<p>Enter the first number: <input type="number" ng-model="num1"/></p>
<p>Enter the Second number: <input type="number" ng-model="num2"/></P>
<input type="button" value="compute" ng-click="myFunc()"/>
<p ng-bind="add"></p>
<p ng-bind="sub"></p>
<p ng-bind="mul"></p>
<p ng-bind="div"></p>
</center>
<script>
var app=angular.module('prog3',[]);
app.controller('ctr<html ng-app="prog3">
<head>
<script src="angular.min.js"></script>
<style type="text/css">
marquee{
color:aqua;
font-size: 30px;
}
h1{
font-size: 30px;
}
p{
color:white;
font-size: 20px;
}
input{
color:black;
font-size:20px;
}
</style>
</head>
<body bgcolor="red" ng-controller="ctrl">
<center>
<marquee scrollamount="10">Welcome to the Dept</marquee>
<h1>Calculator Using HTML and CSS with Angular JS </h1>
<p>Enter the first number: <input type="number" ng-model="num1"/></p>
<p>Enter the Second number: <input type="number" ng-model="num2"/></P>
<input type="button" value="compute" ng-click="myFunc()"/>
<p ng-bind="add"></p>
<p ng-bind="sub"></p>
<p ng-bind="mul"></p>
<p ng-bind="div"></p>
</center>
<script>
var app=angular.module('prog3',[]);
app.controller('ctrl',function($scope)
{
$scope.myFunc=function()
{
$scope.add=$scope.num1+$scope.num2;
$scope.sub=$scope.num1-$scope.num2;
$scope.mul=$scope.num1*$scope.num2;
$scope.div=$scope.num1/$scope.num2;
}
});
</script>
</body>
</html>l',function($scope)
{
$scope.myFunc=function()
{
$scope.add=$scope.num1+$scope.num2;
$scope.sub=$scope.num1-$scope.num2;
$scope.mul=$scope.num1*$scope.num2;
$scope.div=$scope.num1/$scope.num2;
}
});
</script>
</body>
</html>