Click here to Skip to main content
15,921,276 members

Comments by jehat hassan (Top 3 by date)

jehat hassan 7-Apr-15 16:17pm View    
There is a way that uses roughly like this:

int a= 7314,index=0,t=7314,num=0;
for (int i = 0;t>0; i++)
{
t/=10;
index++;
}
for (int i = 0; i < 10; i++)
{
int x=a%10;
a/=10;
int y=a%10;
if (x<y) {="" int="" temp="x;" a="" =10;="" a*="100;" a+="y;" }="" else="" &nbsp;="" &lt;="" pre="">
But this is not true code, but I almost have thus resolved
jehat hassan 7-Apr-15 16:09pm View    
Only note
Using only% and /

for java or c# or c++....
jehat hassan 7-Apr-15 16:02pm View    
Only note
Using only% and /