A java program to accept two integers and print all the number between them..
Answers
Answered by
0
Accept 2 no.s from user a and b.
if ((a-b ==1) || (b-a ==1))
print "There are no noms b/w a and b".
else
print "The no.s are"
for( i= a+1;i<b;i++)
{print i
}
I have forgotten the exact java format sp i have just given the algorithm . hope u ll get it.
if ((a-b ==1) || (b-a ==1))
print "There are no noms b/w a and b".
else
print "The no.s are"
for( i= a+1;i<b;i++)
{print i
}
I have forgotten the exact java format sp i have just given the algorithm . hope u ll get it.
Similar questions