Skip to content

Instantly share code, notes, and snippets.

@uqmessias
Created May 15, 2016 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uqmessias/9af4705de42f84b74461b96d1a7c8f09 to your computer and use it in GitHub Desktop.
Save uqmessias/9af4705de42f84b74461b96d1a7c8f09 to your computer and use it in GitHub Desktop.
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