Home
About Us
Privacy Policy
Terms and Conditions
Copyright
Contact Us
Register
Sign In
Search
Questions
Naina241
@Naina241
April 2021
1
39
Report
Plzz help guys
Write a program to print all the prime no. between 10 to 100
(using loop)
Answers & Comments
frederickgomespakvin
Import java.util.Scanner;
public class prime_n0_range
{
public static void main(String args[])
{
int num;
int flag,fac,i;
for(i=10;i<=100;i++)
{
fac=2;
flag=0;
num=i;
while(num>fac)
{
if(num%fac==0)
{
flag=1;
break;
}
else
{
fac++;
}
}
if(flag==0)
{
System.out.println(num+" is a prime number");
}
}
}
}
2 votes
Thanks 1
Add an Answer
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
More Questions From This User
See All
Naina241
September 2021 | 0 Replies
essay on how i had celebrated my grandfather's birthday...NO COPING FROM INTERNE...
Answer
Naina241
September 2021 | 0 Replies
Hey guys..Plz solve this Question...
Answer
Naina241
September 2021 | 0 Replies
hey guysgd eveningplz answer the following set of questions
Answer
Naina241
August 2021 | 0 Replies
which type of soil in the malwa plateau plzz help guys
Answer
Naina241
August 2021 | 0 Replies
plzzz answer it fast ...!!!!!...
Answer
Naina241
August 2021 | 0 Replies
what do bars of rags stand for in the poem "I know why the caged bird sings "plz...
Answer
Naina241
June 2021 | 0 Replies
hey guysplz solve this problem
Answer
Naina241
May 2021 | 0 Replies
find the equation of straight line parallel to line joining the points (7,5) (1,...
Answer
Naina241
April 2021 | 0 Replies
Summary of merchant of Venice act 4 scene 1 in 150 words.....Hope you guys will ...
Answer
Naina241
April 2021 | 0 Replies
Hey guys ....plzz solve the following problem...
Answer
Recommend Questions
normaica19
November 2022 | 0 Replies
pasagot ngayon na ito ipapasa please
faithvalerieturno
November 2022 | 0 Replies
how do early beliefs about constellations effect human culture
Muning1027
November 2022 | 0 Replies
yung tama po pls kailangan ko na bukas na talaga po submit ng modules ko
neshthmd
November 2022 | 0 Replies
is a disease causing organism that lives in humans or other animals and derives ...
gamboelise83
November 2022 | 0 Replies
or directionbf361c2d468f8ffa07252b7f7f4e2a8d 39180
laimarnisle
November 2022 | 0 Replies
What are the possible solution that may help the preservation of our flora and f...
duermejhonber
November 2022 | 0 Replies
why are there differrence between the colling rates of sand and water
namronlamoste24
November 2022 | 0 Replies
supernova elements form...
princeclarkcasipe30
November 2022 | 0 Replies
It is responsible for the extractions og energy from the food we eat...
faderonprincessmae
November 2022 | 0 Replies
please help me if you help me i will follow you
×
Report "Plzz help guysWrite a program to print all the prime no. between 10 to 100(using..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
About Us
Privacy Policy
Terms and Conditions
Copyright
Contact Us
Helpful Social
Get monthly updates
Submit
Copyright © 2024 EHUB.TIPS team's - All rights reserved.
Answers & Comments
public class prime_n0_range
{
public static void main(String args[])
{
int num;
int flag,fac,i;
for(i=10;i<=100;i++)
{
fac=2;
flag=0;
num=i;
while(num>fac)
{
if(num%fac==0)
{
flag=1;
break;
}
else
{
fac++;
}
}
if(flag==0)
{
System.out.println(num+" is a prime number");
}
}
}
}