answersLogoWhite

0

<SCRIPT LANGUAGE="VBSCRIPT">

DIM i,n,j

n = 100

DOCUMENT.WRITE("Prime nos are")&space(1)&"1"&space(2)&"2"&space(2)

X=0

FOR j = 3 TO n

FOR i = 2 TO (j-1)

IF i MOD j <> 0 THEN

DOCUMENT.WRITE(i)&space(2)

X=1

END IF

NEXT

NEXT

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

How do find factorial using vbscript?

&lt;html&gt; &lt;script language="vbscript"&gt; n=cint(inputbox("Enter a number")) dim f f=1 if n&lt;0 then Msgbox "Invalid number" elseif n=0 or n=1 then MsgBox "The factorial of given number "&amp;n&amp;" is :"&amp;f else for i=n to 2 step -1 f=f*i next MsgBox "The factorial of given number "&amp;n&amp;" is :"&amp;f end if &lt;/script&gt; &lt;/html&gt;


Find the prime factors of the number 24?

The prime factors of 24 are 2 and 3.


How do you write a Shell script to find the greatest among the given set of numbers using command line arguments?

To find the greatest number among a set of numbers provided as command line arguments in a Shell script, you can use a loop to iterate through the arguments. Here's a simple example: #!/bin/bash greatest=$1 for num in &quot;$@&quot;; do if (( num &gt; greatest )); then greatest=$num fi done echo &quot;The greatest number is: $greatest&quot; Save this script as find_greatest.sh, make it executable with chmod +x find_greatest.sh, and run it by passing numbers as arguments, like ./find_greatest.sh 3 5 1 8.


Write a c program to find out the prime numbers between 1 to 500?

To write a C program to find prime numbers between 1 to 500, you can use a nested loop structure. In the outer loop, iterate from 2 to 500, and in the inner loop, check if the number is divisible by any number from 2 to the square root of the number. If it is not divisible by any number other than 1 and itself, then it is a prime number. Print out all prime numbers found within the specified range. Remember to include necessary header files, such as &lt;stdio.h&gt;, and use appropriate logic to implement the program efficiently.


What is a flowchart for finding perfect no?

flow chart to find whther the given number is perfect or not

Related Questions

How can find prime numbers using do while in java script?

//some students also asked it with alert dialog box ! I have done it in a HTML page 100% working best of Luck !_Z triplezero here :) &lt;script type="text/javascript"&gt; var inum, icount=2; var irem; inum = prompt("Enter a number."); if(inum==1) { alert("The no. is not prime"); document.write("The no. is not prime"); exit(0); } if(inum==2) { alert("The no. is prime"); document.write("The no. is prime"); exit(0); } do { irem=inum%icount; if(irem==0) { alert("The no. is not prime"); document.write("the given no is not prime"); exit(0); } icount++; } while(icount&lt;=(inum/2)); alert("The no. is prime"); document.write("the given number is prime"); &lt;/script&gt;


Find the number with the given prime factorization 7x11x13x17?

17,017


How do you find the primeFactors of a given number?

By dividing it by the prime factors that have no remainders


How do you find twin primes of number?

To find twin primes of a given number, iterate through the numbers starting from the given number, and for each number, check if both the number and the number+2 are prime. If they are, then they form a pair of twin primes with the given number.


Why is 836475 not a prime number?

A number which is divisible by itself and 1 is called prime number. A prime number has only two factors.But, 836475 is also divisible by5, i.e. 836475 has more than two factors.Therefore, the given number is not prime.In order to show that given number is not prime there is no need to find all the factors, we should show that given number has more than two factors.


To find weather the given no is prime or not?

Prime numbers have two and only two factors. If the number has more than two factors, it is not prime.


How do you find the given number is prime or not?

you see if it can be divided by any numbers that are not 1 or itself


How do you write a program to find whether the given number is prime or not and show output?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int n,a=2; clrscr(); printf("\n enter n"); scanf("%d",&amp;n); if(i&lt;=a-1) { if(a%i==0) { printf("\n the given number is not a prime number"); break; } i++; if(a==i) { printf("\n the given number is a prime number"); } getch(); output: enter the value of n:2 the given number is prime number


How can divisibility rules help you find the prime factorization of a number?

they can help you by finding the two factors of the number given


Are there prime numbers over 100?

Sure, since there are INFINITELY MANY prime numbers, that means you will find prime numbers over any given number.


What is the Python script for nth prime number?

As people have been trying to find a script of some sort using the most powerful computers in the world for 60 years to no result, so no one can assist you in this question yet...


How do you find the greatest prime factor for a given number?

Start with the lowest prime factors 2, 3, 5, 7 etc and work up.