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'
Simply print the whole source-code.
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.
Oh, what a lovely request! In FoxPro, you can create a program to print all prime numbers from 1 to 100 by using a loop to check each number for divisibility only by 1 and itself. If it meets this criteria, you can print it out on the screen. Remember, every number is unique and special, just like a happy little tree in a vast forest.
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
echo 'print a pattern'
What is happening in the print in source is that various documents are being published.