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 fssttotal;
            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();
        }
    }
}

2 Comments

Post a Comment

Previous Post Next Post