is that a rule for java?
Type: Posts; User: berk
is that a rule for java?
what do you mean by missing? I put my return statement into an else statement
when i put
return true after the for loop
my program works
for (int i = 2; i <= n / 2; i++)
{
if (n % i == 0)
{
return false;
}
public class Programme {
there is no error for this code:
public static void main(String[] args) {
int count = 0;
for (int i = 10; i < 50; i++) {
if (isprime(i)) {
I have a question and I almost completed this. However, have a simple problem which I can't solve.
Design and implement a program that uses for loops to print the following rectangular pattern...
I have a better idea
import java.util.Scanner;
public class FirstProgramme
{
public static void main(String[] args)
{
System.out.print("Please enter a number: ");
Hello,
thanks for your comment
this is my new code
int a;
a=1;
System.out.println("Please enter a number: ");
Scanner in=new Scanner(System.in);
int n=in.nextInt();
while ( a<n)
...
first read a positive integer value, n, from the user
Write a while loop to output the integer values from 0 up to n exclusive. The output should have five values per line, with values separated...
I think I've solved the question by doing that
import java.util.Scanner;
public class İlkProgram
{
Hello I'm a new java student and I have an assignment which is
Design and implement a program that computes the maximum number of flowers that can be planted in a triangular-shaped garden having...
Hello I have a java question but I don't know how to combine it with html and how to create an web browser with my java code
Try to solve the following problem. Note: Don't let the html code...
Hello I'm a new java student and I have an assignment which is
Design and implement a program that computes the maximum number of flowers that can be planted in a triangular-shaped garden having...