English, asked by srilekhamamidi902, 1 month ago

50
Question #4
Revisit
Choose the E
ge
The following program is used for finding whether a number is prime or not. Which line
in the following program has an error?
O Line 1
O Line 2
O Line 3
O No error
int num;
1 class abc
2 {
3
public
static void main(String args[])
4 {
5
boolean isprime=true;
7
num=10;
8
9 for(int i=2; i<=num/2; i++)
// Line 1
10 {
11
if((num / i)==0)
// Line 2
12
{
13
isprime=false;
break;
}
76
?
18
19
29
if(isprime)
System.out.prinln("Prime");
else
System.out.prinln(" Not Prime");
Line 3​

Answers

Answered by sriram2787
0

Answer:

uh-oh hub of the skin particularly palms and feet you have any other questions please feel sorry I will come we will meet at my exam s home you will come we have write all rights are doing gloo wall I will be free I have been trying to you will play a role in the woy to you and your team as

Similar questions