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

Looking For Something at vustudents.ning.com? Click Here to Search

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

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

please share your comment about assignment 508 please anyone start discussion.............

+ How to Follow the New Added Discussions at Your Mail Address?

+ 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?


See Your Saved Posts Timeline

Views: 4451

.

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

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

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

cs508 assignmnt solution 2017 -

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();
int primeNumber = 0;
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])) {
primeNumber++;
}
}
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;
}
}

import java.utill.Random;
import java.utill.Scanner;

public class Assignment
{
public static void main(String[] args) {
Scanner src = new Scanner (System.in);
Random random = new Random();
int primeNumber = 0;
System.out.print("Enter the size of arrays: ");
int n = sc.nextInt();

system.out.println();

int [][] array = =new int [n][n];

for (int i=0; i<n; i++) {
for (int j=0; j<n; j++) {
array [i][j] = random.nextIn (bound 90)+10;
}
}
for (int i=0; i<n; i++) {
for (int j=0; j<n; j++) {
system.out.print (array [i][j]+" ");
if (isPrime(array[i][j])){
primeNumber++;
}
}
system.out.println();
}
system.ou.println("\nTotal 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;

import java.utill.Random;
import java.utill.Scanner;
public class Assignment
{
public static void main(String[] args) {
Scanner src = new Scanner (System.in);
Random random = new Random();
int primeNumber = 0;
System.out.print("Enter the size of arrays: ");
int n = sc.nextInt();
system.out.println();
int [][] array = =new int [n][n];
for (int i=0; i<n; i++) {
for (int j=0; j<n; j++) {
array [i][j] = random.nextIn (bound 90)+10;
}
}
for (int i=0; i<n; i++) {
for (int j=0; j<n; j++) {
system.out.print (array [i][j]+" ");
if (isPrime(array[i][j])){
primeNumber++;
}
}
system.out.println();
}
system.ou.println("\nTotal 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;

Code notepad mai .java mai save krky upload krna hy LMS py.

RSS

Latest Activity

وجدان liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion میرا پیارا وطن برا نہیں ہے
7 minutes ago
Haris Bscs replied to Haris Bscs's discussion When will Pass-out notifications show on lms ! for graduating students
41 minutes ago
+ ! ! ! ! HaMza ! ! ! ! + updated their profile
1 hour ago
+! ! ! Mano ! ! !+ posted a discussion
1 hour ago
Rana Ali replied to zohaib iftikhar's discussion ..* TAKLEEF ...*
2 hours ago
Rana Ali liked zohaib iftikhar's discussion ..* TAKLEEF ...*
2 hours ago
+ ! ! ❥ρsүcнσ༄ ! ! + replied to _♣ ♠ Ω HαααŇǃ ™ Ф ♠ ♣ _'s discussion REAL Life Story of a VU Female Student ..... (MUST READ) -- Thought Provoking
4 hours ago
+ ! ! JS ! ! + liked _♣ ♠ Ω HαααŇǃ ™ Ф ♠ ♣ _'s discussion REAL Life Story of a VU Female Student ..... (MUST READ) -- Thought Provoking
6 hours ago
+❤️S͓̽o͓̽m͓̽i͓̽ V͓̽i͓̽r͓̽k͓̽❤️+ and +ıllıllı $µǥąя ǥ€ɲɨµ$ ıllıllı+ are now friends
8 hours ago
+ ! ! ! ! ! ! ! ! ђคlєє๓ค ! updated their profile
8 hours ago
+ ! ! ! ! ! ! ! ! ђคlєє๓ค ! replied to _♣ ♠ Ω HαααŇǃ ™ Ф ♠ ♣ _'s discussion REAL Life Story of a VU Female Student ..... (MUST READ) -- Thought Provoking
9 hours ago
zohaib iftikhar replied to zohaib iftikhar's discussion ...*...* MAIN NY ULFAT K TAQAZON KO NIBHAYA AKSAR ...*...*
9 hours ago

© 2020   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.