Answer to Question #266663 in C# for Israel

Question #266663

Write a program that computes that amount of money a computer club will receive from proceeds of their Magwinya café sales project. The Magwinya are sold in cases that contain a dozen in each case. Allow the user to enter the number of cases sold and the sale price per gwinya. Each case contains 12 magwinya; each case is purchased at R15.00 per case from a local vendor. The computer club is required to give the SRC 10% of their earnings. Display their proceeds formatted with currency. Display instructions to the user about the application. Display all inputs and calculated values. Write appropriate methods for your solution.



1
Expert's answer
2021-11-16T05:21:57-0500


using System;
using System.Collections.Generic;


namespace App
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("This program computes amount of money acomputer club\nwill receive from proceeds of their Magwinya cafe sales project.");
            Console.WriteLine("The Magwinya are sold in cases that contain a dozen \nin each case. Allow the user to enter the number of cases sold and the sale price per gwinya.");
            Console.WriteLine("Each case contains 12 mawginya; each case is purchased\nat R15.00 per case from a local vendor. The computer club is required to give the SRC 10% of their earnings. ");


            Console.Write("\n\nEnter the number of cases sold: ");
            int numberCasesSold = int.Parse(Console.ReadLine());
            Console.Write("Enter sale price per gwinya [0-1.25]: ");
            double price = double.Parse(Console.ReadLine());
            double earnings = numberCasesSold * 12 * price;
            double purchasePrice = numberCasesSold * 15;
            earnings = purchasePrice - earnings;
            double SRC = earnings * 0.1;
            earnings = earnings - SRC;
            Console.WriteLine("\nThe number of cases sold: {0}", numberCasesSold.ToString());
            Console.WriteLine("Sale price per gwinya: {0}", price.ToString("C"));
            Console.WriteLine("\nThe SRC 10%: {0}", SRC.ToString("C"));
            Console.WriteLine("The earnings: {0}", earnings.ToString("C"));


            Console.ReadLine();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS