Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
void Main()
{
Console.WriteLine("Digite um número que represente A:");
string aString = Console.ReadLine();
Console.WriteLine("Digite um número que represente B:");
string bString = Console.ReadLine();
float a, b;
a = float.Parse(aString);
b = float.Parse(bString);
float somaDeAeB = somar(a, b);
Console.WriteLine("A soma de " + a + " e " + b + " é igual a: " + somaDeAeB);
}
float somar(float numero1, float numero2)
{
return numero1 + numero2;
}
// Define other methods and classes here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.