Create Calculator Code in Angular Js

Design File :-

<!DOCTYPE html>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="calc.js"></script>
<div ng-app="myapp" ng-controller="myctrl">
<input type="text"  ng-model="txtresult" />
<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')"  />
<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')"  />
<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('/')"  />
<input type="button" value="=" ng-click="fun('=')"  />



var app = angular.module("myapp",[]);


  if(a !='=')
  $scope.txtresult +=a;
  $scope.txtresult = eval($scope.txtresult);




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


POST Answer of Questions and ASK to Doubt

Post a Comment (0)