<script> var n=6; for(i=1;i<=n;i++){ var total=0; for(j=1;j<=i;j++){ document.write(j) if(j<i){ if(i!=1){ document.write("+") } } total+=j; } document.write("="+total+"<br>"); } </script>
It's very helpful sir
very helpful sir
Comments 2