subject

Assign to the variable boolean 'primesecond' the value true if the second leading (just after the most significant) decimal digit of the value of an int variable 'n' is 2,3,5 or 7; otherwise assign 'primesecond' the value false . assume 'primesecond' and 'n' are already declared and that 'n' has already been assigned a value . so if n's value is 58047 primesecond will be false because the second leading digit of 58047 is 8 which is not 2 or 3 or 5 or 7.so far i have: while (n > 1) {int n=((n%1)/1000)); if( (n==2)||(n==3) || (n==5)|| (n==7) ){primesecond=true; }else primesecond = false; }system. out. println(primesecond); this keeps giving me an error and saysctest. java: 7: error: '; ' expected int n=((n%1)/1000)); ^1 erroryou almost certainly should be using:

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:00, jabezslade22
What is the first view you place in your drawing?
Answers: 1
image
Computers and Technology, 22.06.2019 21:00, mazolethrin9632
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
image
Computers and Technology, 22.06.2019 21:30, sunshinekisses
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
image
Computers and Technology, 23.06.2019 04:10, cvbnkifdfg
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
You know the right answer?
Assign to the variable boolean 'primesecond' the value true if the second leading (just after the mo...

Questions in other subjects:

Konu
Mathematics, 01.10.2019 15:10
Konu
Social Studies, 01.10.2019 15:10