Answer to Question #231421 in C# for joeyy

Question #231421

Write a program that requires you to calculate a shop’s total money in a specific register. All

the different notes should be added to calculate how much money is in the register. The coins

are added together manually and then added to the total. Required input values are:

o The amount of 10 rand notes.

o The amount of 20 rand notes.

o The amount of 50 rand notes.

o The amount of 100 rand notes.

o The amount of 200 rand notes.

o The total of the coins.

The output is the total cash in the register.


1
Expert's answer
2021-08-31T00:53:16-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;


namespace ShopTotalMoney
{


    class Program
    {
        static void Main(string[] args)
        {
            int total = 0;
            //The amount of 10 rand notes.
            Console.Write("Enter the number of 10 rand coins: ");
            int coins = int.Parse(Console.ReadLine());
            total += coins * 10;
            //The amount of 20 rand notes.
            Console.Write("Enter the number of 20 rand coins: ");
            coins = int.Parse(Console.ReadLine());
            total += coins * 20;
            //The amount of 50 rand notes.
            Console.Write("Enter the number of 50 rand coins: ");
            coins = int.Parse(Console.ReadLine());
            total += coins * 50;
            //The amount of 100 rand notes.
            Console.Write("Enter the number of 100 rand coins: ");
            coins = int.Parse(Console.ReadLine());
            total += coins * 100;
            //The amount of 200 rand notes.
            Console.Write("Enter the number of 200 rand coins: ");
            coins = int.Parse(Console.ReadLine());
            total += coins * 200;
            //display the total of the coins.
            Console.WriteLine("The total is: {0}", total.ToString());




            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

Raul Kamoco
11.02.22, 13:57

this was very helpful ,thank you

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS