Java, .NET, PHP, PYTHON, ANGULAR, .NET, ML, Data Scince, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Design File :-
calc.html

<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="calc.js"></script>
</head>
<body>
<div ng-app="myapp" ng-controller="myctrl">
<input type="text"  ng-model="txtresult" />
<br><br>
<input type="button" ng value="1" ng-click="fun('1')" />
<input type="button" value="2" ng-click="fun('2')"  />
<input type="button" value="3" ng-click="fun('3')"  />
<input type="button" value="4" ng-click="fun('4')"  />
<br><br>
<input type="button" ng value="5" ng-click="fun('5')" />
<input type="button" value="6" ng-click="fun('6')"  />
<input type="button" value="7" ng-click="fun('7')"  />
<input type="button" value="8" ng-click="fun('8')"  />
<br><br>
<input type="button" value="+" ng-click="fun('+')"  />
<input type="button" value="-" ng-click="fun('-')"  />
<input type="button" value="*" ng-click="fun('*')"  />
<input type="button" value="/" ng-click="fun('/')"  />
<br><br>
<input type="button" value="=" ng-click="fun('=')"  />
</div>
</body>

</html>

calc.js

var app = angular.module("myapp",[]);
app.controller('myctrl',function($scope){

  $scope.txtresult='';

  $scope.fun=function(a)
  {
  if(a !='=')
  {
  $scope.txtresult +=a;
  }
  else
  {
  $scope.txtresult = eval($scope.txtresult);
  }
 
 

  }

});

Assignment:-

Q4)WAP to create mark-sheet of Student using five different subject with following condition?

1)  All Subject Marks Should be 0 to 100.

2) If only Subject Mark is <33 Then Student will Suppl

3) If Minimum Two Subject Marks is <33 Then Student Will Fail

4) IF all Subject Marks is > 33 then percentage and division should be calculated.

5)  IF only one subject Mark is >28 and <33 then 5 grace marks will be applied and student will be pass by grace.

6)  Display Grace Subject Name,Distinction Subject name ,Supp Subject name and Failed Subject name . 

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post