Last active
November 2, 2018 16:46
-
-
Save mesaque/41f8cb091978c5b6857a510506d898ff to your computer and use it in GitHub Desktop.
fael script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Fael | |
{ | |
class Employee | |
{ | |
float salarioMensal; | |
public Employee(float salarioMensal) | |
{ | |
this.salarioMensal = salarioMensal; | |
} | |
public double calcularSalarioAnual(int mesesTrabalhados) | |
{ | |
return salarioMensal * mesesTrabalhados; | |
} | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
float payment; | |
int months; | |
Console.WriteLine("Por favor escreva o seu salario:"); | |
payment = float.Parse( Console.ReadLine() ); | |
Employee e = new Employee(payment); | |
Console.WriteLine("Por favor escreva os meses trabalhados:"); | |
months = int.Parse(Console.ReadLine()); | |
Console.WriteLine("O salario anual é: R${0}", e.calcularSalarioAnual(months)); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment