0
using System;
using System.Security.Cryptography.X509Certificates;
namespace projeto
{
class Program
{
static void Main(string[] args)
{
Dados a = new Dados();
Console.Write("Entre com o numero da conta: ");
a.Nconta = double.Parse(Console.ReadLine());
Console.WriteLine();
Console.Write("Entre com o nome: ");
a.Nome = Console.ReadLine();
Console.WriteLine();
// O erro começa aqui em baixo
Console.Write("Haverá um deposito inicial (s/n)? : ");
var deposito = Console.ReadKey().ToString();
if (deposito == "N")
{
double depositado = 0;
}
else if (deposito == "S")
{
Console.Write("Entre com o valor depositado: ");
double depositado = double.Parse(Console.ReadLine());
}
}
}
}
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).
– Maniero