Өгөгдсөн тооны хөрвөсөн тоог буцаах функц бүхий програм бич.

‪#‎include‬<stdio.h>
#include<conio.h>
typedef unsigned long ulong;
ulong urvuu(ulong x)
{ulong y;
while(x!=0){y=y*10+x%10;
x=x/10;}
return y;
}
void main()
{ulong n;
printf("n toog oruulna uu?"); scanf("%d",&n);
printf("ugugdsun toonii hurvusun too ni:%d",urvuu(n));
getch();
}

Comments