We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# cs 508 Assignment

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 4452

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Attachments:

### Replies to This Discussion

mere pass ye error aa rha he koi theek kr de

aap ka code ghalat hai

for (int i=2; i<num/2; i++){

yeh code hai

in which form we have to submit our assignment?

and my line no 33 is giving an error of illegal expression. what is this?

add 1 more curly braket at the end for error 44.

Dear check whether you declared num or not?

plz is me bh help kr de

Enjoy Full Code

import java.util.Random;
import java.util.Scanner;
public class Assignment {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Random random = new Random();
System.out.print("Enter the size (rows and columns) of array:");
int n = sc.nextInt();

System.out.println();

//Assign Random Number To Array
int[][] array = new int[n][n];

for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
array[i][j] = random.nextInt(90) + 10;
}
}
//Traversing The Array
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
System.out.print(array[i][j] + " ");
//Check If Prime Number Found
if (isPrime(array[i][j])) {
}
}
System.out.println();
}
System.out.println("Total Prime Numbers Found:" + primeNumber);
}
public static boolean isPrime(int number) {
boolean flag = true;

for (int i = 2; i < number / 2; i++) {
int tmp = number % i;
if (tmp == 0) {
flag = false;
break;
}
}
return flag;
}
}

koi byte ga ye assignment just nodepad m edit kr k .java m save krni hy

ya netbeans use krna hy

Dear ye code run nai ho raha proper Error Show karwa raha hy please send the complete solution without any error...

How to save a .JAVA file in Notepad [CC]

for make .java file

How to save a .JAVA file in Notepad [CC]

## Latest Activity

+ Syeda updated their profile
15 minutes ago
Um e Laila liked Muhammad arslan's profile
16 minutes ago
29 minutes ago
Hunny HA updated their profile
43 minutes ago
+ "αяsαℓ " Ќąƶµяɨ •" posted discussions
45 minutes ago
1 hour ago
Saif updated their profile
1 hour ago
1 hour ago
1 hour ago
1 hour ago

1

2

3