Bom dia, estava tentando fazer um programa no C# (Console) que conseguisse ler uma string e exibir ela ao contrário, e está dando os seguintes erros:
Error 1 Operator '<' cannot be applied to operands of type 'int' and 'int[]'
Error 2 Operator '-' cannot be applied to operands of type 'int[]' and 'int'
Se alguém puder me ajudar eu agradeço, com certeza tem algum erro de lógica aí, se puderem me ajudar nisso também, seria de bom proveito.
Aqui segue o código:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string [] texto = new string [1];
int [] tamanho = new int [texto.Length];
texto [0] = Console.ReadLine();
for (int i = 0; i<tamanho; i++)
{
tamanho[i] = (tamanho - 1 - i);
}
Console.WriteLine("Tamanho igual: ", tamanho);
}
}
}
h0br's Content
There have been 1 items by h0br (Search limited from 26/05/2023)