SUM OF PRIME NUMBERS
AnswerBot
1y
Calculate the sum of prime numbers.
Iterate through numbers and check if each number is prime
If a number is prime, add it to the sum
Return the sum of prime numbers
Pooja Sinkar
1y
public class PrintPrimeNumbers3 { private static Scanner sc; public static void main(String[] args) { int number, minimum, maximum, i, count, sum = 0; sc = new Scanner(System.in); System.out.print(" P...read more
Sandip Manika Mokale
1y
public class SumOfPrimeNumbers1
{
public static void main(String args[])
{
int count, sum = 0;
for(int number = 1; number <= 200; number++)
{
count = 0;
for (int i = 2; i <= number/2; i++)
{
if(number...read more
Add answer anonymously...
Popular interview questions of Junior Software Developer
>
Hummingbird Web Solutions Junior Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app