Tuesday 24 July 2018

Accept User Values From Array

<html>
<head>
<h1> Accept user values from Array</h1>
</head>
<body>
<button onclick="display()">Display</button>

<script>
function display()
{

var n=0, i,j,a,r;
var arr1=[];

n=parseInt(prompt("Type how many numbers you would like to take"));
document.write("Entered Value are : "+"<br/>");


for(i=0;i<n;i++)
        {
          a=parseInt(prompt("Enter number " + (i+1)));
          arr1[i]=a;
          document.write(arr1[i]+ "<br/>");
        }
       
  }     
</script>
</body>
</html>

1 comment:

  1. Python is an open-source, high level, interpreted programming language which offers great opportunities for object-oriented programming. Choosing a python training program from Red Prism Group, which is best training institute for python in noida.

    ReplyDelete

apply function in R

1) apply function: It takes 3 arguments matrix,margin and function.. Example: m<-matrix(c(1,2,3,4),nrow=2,ncol=2) m #1 indicates it is ap...