using System;public static class B3639 private static void Main string s=ConsoleReadLineSplit ; forint j=sizeofssizeofstring-1;j=0;j-- ifcharIsDigitsj0 forint i=sjLength-1
The code has a few errors. Here's the corrected version:
using System;
public static class B3639
{
private static void Main()
{
string[] s = Console.ReadLine().Split(' ');
for (int j = s.Length - 1; j >= 0; j--)
{
if (char.IsDigit(s[j][0]))
{
for (int i = s[j].Length - 1; i >= 0; i--)
{
Console.Write(s[j][i]);
}
}
else
{
for (int i = 0; i < s[j].Length; i++)
{
if (char.IsLower(s[j][i]))
{
Console.Write(char.ToUpper(s[j][i]));
}
else if (char.IsUpper(s[j][i]))
{
Console.Write(char.ToLower(s[j][i]));
}
}
}
Console.Write(' ');
}
Console.Write('\n');
}
}
This code should compile and run without any errors
原文地址: https://www.cveoy.top/t/topic/hDFF 著作权归作者所有。请勿转载和采集!