
Java help
Started by
jaj2
, Jan 27 2006 11:32 AM
#1
Posted 27 January 2006 - 11:32 AM

#2
Posted 27 January 2006 - 01:36 PM

welcome back jaj2,
let's see if you can modify the code from your previous topic using indexOf() again.
from the last topic, s.indexOf( '7' ) returns -1 if '7' is not found
and s.indexOf( '7' ) returns a number greater than or equal to zero if
'7' is found.
hint: the line below needs to be modified to find '1' and '3'
if( s.indexOf( '7' ) == -1 )
also verify 'i <= 1000' is in your code(as below)
for( int i = 1;i <= 1000;i++ ) {
bdlt
let's see if you can modify the code from your previous topic using indexOf() again.
from the last topic, s.indexOf( '7' ) returns -1 if '7' is not found
and s.indexOf( '7' ) returns a number greater than or equal to zero if
'7' is found.
hint: the line below needs to be modified to find '1' and '3'
if( s.indexOf( '7' ) == -1 )
also verify 'i <= 1000' is in your code(as below)
for( int i = 1;i <= 1000;i++ ) {
bdlt
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users
As Featured On:






