0
Write a code that can print the prime numbers of a given value
Java and C++
11 Respuestas
+ 8
A given value can be prime or not prime... but you cannot << print the prime numbers of a given value >>... this is rather called finding the prime factors... if this is what you're meaning ^^
+ 6
part one: the prime function checker...
https://code.sololearn.com/WteKxMC4vDvC/?ref=app
part two: GCD function (using prime factorization):
https://code.sololearn.com/WPXD8LSoeiIL/?ref=app
+ 4
JS is enough near of both other syntax to be easily adapted/translated ^^
+ 4
@Uzondu Obillor: there's a useful 'edit' option in top right three dots colon menu of each post ;)
+ 2
This code finds primes up to the given number.If this is what you meant.
https://code.sololearn.com/cwvereGBLoJS/?ref=app
And this one finds the prime factors:
https://code.sololearn.com/cnu88KWzGjlB/ref=app
+ 1
thank u all.. I am grateful
+ 1
grateful*
+ 1
wow @visph tanx a lot.. I pay little attention, my bad
0
the prime factors
0
pls C++ or java