int x,n
scanf("%d",&n)x=n
while ( x!=0 ) { printf("%d",x%10)x/=10} printf("\n")
int nConsole.WriteLine("Input a number:")
while(!int.TrayParse(Console.ReadLine(), out n))
{
Console.WriteLine("Invalid number, tray again:")
}
StringBuilder sb = new StringBuilder()
string s = n.ToString()
for(int i = s.Length - 1i >-1i--)
{
sb.Append(s[i])
}
Console.WriteLine("Result:" + sb.ToString())
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)