Hey hi,
there should be a condition which checks for the principal value before the inner do while loop.
so if user enters the 0 value for principle , it will not execute the inner do while loop...
Type: Posts; User: ind
Hey hi,
there should be a condition which checks for the principal value before the inner do while loop.
so if user enters the 0 value for principle , it will not execute the inner do while loop...
Hi michael305rodri ,
I tried the posted code, and its working fine, you are on the right track.
the first bracket in the if condition checks whether the 2 sides are same and second brackets checks...
Hi Nikita,
Please post input.txt file also , because when I tried to execute the program that you have posted,
it gave me FileNotFoundException
hi mkrage,
I checked your code and whats going wrong is :
1. you comparing the string variable value with abc variable value using ==,actually you should use .equals() method.
2. also you...
Hi,
I checked your code, even executed the same and what I found was,
a change is needed in the swap code.
what you have written is :
int tmp = x[i] ;
x[i]=x[b] ;
x[b]= tmp ;