Study guides

☆

Q: A program to find that the input number is prime or not?

Write your answer...

Submit

Still have questions?

Continue Learning about Basic Math

10 input "enter a no."; n 20 for i = 1 to n 30 if n mod i = 0 then c = c +1 40 next i 50 if c = 2 then print "prime number" else print "not a prime number" 60 end

Write your own prime number program and find out.

program to find prime number in 8085 microprocessor

First write a program to generate the prime number. After one prime number was generated, divide the big int number by the prime number. If the remainder is zero then quotient is the second prime number ( also it is important to check whether the quotient is prime number or not because sometimes you will get wrong answer). Repeat the process until you get the result.

2 is the least prime number.

Related questions

write a program to find prime number between 1 to500

There is nothing needed as input.But if "input" as the argument passing to a routine, it depends on the routine.It can be a function to determine any given integer (here's the input) is a prime or not, or it can be a function to return all the prime numbers within a range (1 to 100 in this case).the smallest Prime = 2, the only even number as a prime number!any other prime number other than 2 is a POSITIVE ODD INTEGER

10 input "enter a no."; n 20 for i = 1 to n 30 if n mod i = 0 then c = c +1 40 next i 50 if c = 2 then print "prime number" else print "not a prime number" 60 end

any integer is input through the keyboard. write a program to find out whether it is an odd number or even number using if else statement in c#.

Write your own prime number program and find out.

program that take three decimal number as input and find the largest among them in assembly language

program to find prime number in 8085 microprocessor

int number; int i=2; while (i<number) { if(number%i==0) { printf("Not a prime no."); break; } else printf("number entered is prime"); getch(); }

CLS PRINT "PROGRAM: Find if number is odd/or, even" PRINT INPUT "Enter number: ", number$ number% = VAL(number$) PRINT PRINT "The number is "; IF number% MOD 2 = 0 THEN PRINT "even." ELSE PRINT "odd." END IF END

Write a C program called MonthDays to find the number of days in a given month Test your code with different input values to demonstrate that your function is robust?

Divide the prime number.

VBnet program to find the prime numbers between 100 to 200?

People also asked