Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by ze ( 13 years ago )
#include <stdio.h>
int pomestuvac(int n)
{
if(n<100 && n>9)
return (n)*10+n/10;
if(n<10||n<1000)
return n;
int brojac=1, pom=n;
for(;pom/1000>1000;pom/=10,brojac*=10);
if (n<10000)
return (n)*1000+n/10;
if (n<100000)
return (n0)*1000+n/100;
return (n%(1000*brojac))*1000+n/(1000*brojac);
}
int main(){
int n,vkupn
while(vkupnoN)
{
scanf("%d",&n);
printf("%d\n", pomestuvac(n));
vkupnoN--;
}
return 0;
}
Revise this Paste