Make a program that reads a seller's name, his/her fixed salary and the sale's total made by himself/herself in the month (in money). Considering that this seller receives 15% over all products sold, write the final salary (total) of this seller at the end of the month , with two decimal places.
- Don’t forget to print the line's end after the result, otherwise you will receive “Presentation Error”.
- Don’t forget the blank spaces.
Solution
Before seeing the solution make sure that you tried enough. Don’t paste
the whole code, just find out the logic
using System;
namespace _1009_Salary_With_Bonus
{
class Program
{
static void Main(string[] args)
{
string name;
double fs, st, total;
name = Console.ReadLine();
fs = Convert.ToDouble(Console.ReadLine());
st = Convert.ToDouble(Console.ReadLine());
total = fs + (st * 0.15);
Console.WriteLine("TOTAL = R$ " + total.ToString("f2"));
Console.ReadKey();
}
}
}
Thanks
ReplyDeleteThank you very much. Good Job
ReplyDeletePost a Comment