1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zalisa [80]
3 years ago
8

Write a C# program that prints the number of quarters, dimes, nickels, and pennies that a customer should get back as change. De

clare and initialize all memory locations as integers. On output, show the original change amount as a monetary amount, with two positions to the right of the decimal. Run your program once by performing a compile-time initialization using 92 cents for the value to be converted.
Computers and Technology
1 answer:
kondor19780726 [428]3 years ago
6 0

Following are the code of C# to prints the number of quarters, dimes, nickels, and pennies

Program Explanation:

  • Declaration of the namespace.
  • Made a class named "Class1".
  • Declared the methods as well as the attributes.
  • Declared the main method.
  • Wrote the statements according to the given query.

Program:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace Project1

{

   class Class1      

   {

       static void Main(string[] args)

       {

           int change = 0;

           int quart, dim, nic, pen;

           Console.WriteLine("enter amount of cents (less than 99)");

           change = int.Parse(Console.ReadLine());

           quart = change / 25; //calculate the remainder              

           int p = change % 25;

           dim = (p / 10);

           int a = p % 10;

           // Nickles

           nic = a / 5;

           int c = a % 5;

           pen = c;

           Console.Write("There are {0} quarters.\n", quart);

           Console.Write("There are {0} dimes.\n", dim);

           Console.Write("There are {0} nickels.\n", nic);

           Console.Write("There are {0} pennies.\n", pen);

           Console.ReadLine();

       }

   }

}

Output:

Please find the attachment of the output.

Learn more about C# here:

brainly.com/question/5023004

You might be interested in
Convert the following numbers to binary numbers: 5 , 6 , 7 , 8 , 9 .​
Anon25 [30]

Answer:

log 5,6,7,8,9 is the binary number according to the computer

7 0
3 years ago
Read 2 more answers
What specific record type is found in every zone and contains information that identifies the server primarily responsible for t
ValentinkaMS [17]

The SOA is the specific record type found in every zone and contains information that identifies the sever primarily responsible for the zone as well as some operational properties for the zone.

Explanation:

The Start of Authority Records (SOA) has the following information they are

Serial Number: This number is used to find when zonal information should be replicated.

Responsible person: The Email address of a person is responsible for managing the zone.

Refresh Interval: It specifies how often a secondary DNS server tries to renew its zone information.

Retry Interval: It specifies the amount of time a secondary server waits before retrying the zone information has failed.

Expires After: IT specifies the amount of time before a secondary server considers its zone data if it can't contact with the primary server.

Minimum TTL: It specifies the default TTL value for a zone data when a TTL is not supplied.

4 0
3 years ago
What are the characteristics of a good text-based adventure game? In other words, what are some features that should be in the g
Degger [83]

Answer:

spelling and good format

Explanation:thats all i know

8 0
3 years ago
In order to implement the classic DoS flood attack, the attacker must generate a sufficiently large volume of packets to exceed
gavmur [86]

Answer:

131 packets

Explanation:

Given

W (link ) =0.5 M bits,  and Ping packets ( P ) = 500bytes

To flood a target organization that has a bandwidth of W bits using a packet Mbits, you will require a W / P packet

P ( required ) = 500  * 8 = 4000 bits

therefore the W /P packet is calculated as

= 0.5 M bits / 4000 bits

given that :  1 M bits =  1,048,576 bits

0.5 M bits / 4000 bits=  131.07  

hence approximately 131 packets/ sec is required to flood the target organization

4 0
3 years ago
Who created identity theft ? & what is the content of it
sergij07 [2.7K]

Answer:

The term identity theft was coined in 1964

Explanation:

5 0
4 years ago
Other questions:
  • One of the essential skills that software development engineers must have is the proficiency in at least one of the modern compu
    6·1 answer
  • Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
    13·2 answers
  • What is the name of the computer through which e-mail messages are sent and received?
    12·1 answer
  • Regarding the systems development​ process, ________ addresses the​ question, "Is the system producing the desired​ results?"
    12·1 answer
  • Peripheral are used to
    6·1 answer
  • What else can Xbox do to help reduce negative online behavior? (250 minimum)
    6·1 answer
  • Which of the following statements is NOT true regarding the Security Configuration and Analysis (SCA) tool?
    12·1 answer
  • What does a motherboard legacy BIOS do?
    11·1 answer
  • Which of these devices collects the most information on network activity?
    11·1 answer
  • Can you move it like this? I can shake it like that
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!