public class PrimeNumberPrint {
/**
* @param args
*/
public static voidmain(String[] args) {
// TODO Auto-generated method stub
for(int i =2; i < 10; i++) {
System.out.println(i + " is prime is " + isPrime(i));
}
}
public static booleanisPrime(int n) {
int x = n;
for(int i=2; i if(n%i == 0) { return false; } } return true; } }
write a program to print the series 1/12+1/22+.........+1/n2 ?
PRINT 2,3,5,7,11,13,17,19,23,29,31,37
If you have the series stored in an array, you loop through the array and print each array element in turn. Another possibility is to print out the numbers in the series as you generate them. In that case, you may not need to store anything (depending on the series, of course).
echo 'print a pattern'
// Print prime number series. class prime { void main () { int i = 1; int C = 0; int n = 1; int X = 0; while (X != 1000) { if ( n % i n ) { C = 0; n++ ; i = 0; } } i++ ; } } }
Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.
write a program to print the series 1/12+1/22+.........+1/n2 ?
PRINT 2,3,5,7,11,13,17,19,23,29,31,37
If you have the series stored in an array, you loop through the array and print each array element in turn. Another possibility is to print out the numbers in the series as you generate them. In that case, you may not need to store anything (depending on the series, of course).
No. You can compile without printing the source. Indeed, I know of no compiler that would allow a program's source to be printed while it is being compiled. They are completely separate and unrelated tasks.
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
This would require some computer knowledge. It can make it easier to find out the prime numbers without figuring it out in your head.
a NON print source is a source that is not printed, like electronic media. A website.
If you need help with a printer just go to the print source.
10 print "That is not a question." 20 print "That is a command." 30 end
What is happening in the print in source is that various documents are being published.
echo 'print a pattern'