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
rosijanka [135]
3 years ago
9

Create an application for a library and name it FineForOverdueBooks. TheMain() method asks the user to input the number of books

checked out and the number of days they are overdue. Pass those values to a method named DisplayFine that displays the library fine, which is 10 cents per book per day for the first seven days a book is overdue, then 20 cents per book per day for each additional day. The library fine should be displayed in the following format:
Computers and Technology
1 answer:
user100 [1]3 years ago
7 0

Answer:

using System.IO;

using System;

class FineForOverdueBooks

{

static void Main()

{

Console.WriteLine("Enter the number of books user checked out: ");

int books = Convert. ToInt32(Console.ReadLine());

Console.WriteLine("Enter the number of overdue days: ");

int days = Convert. ToInt32(Console.ReadLine());

DisplayFine(books, days);

}

public static void DisplayFine(int books, int days) {

double amt = 0;

int d = days;

if(days>7) {

amt = (days-7) * .20 * books;

days = 7;

}

if(days > 0) {

amt = amt + days * .10 * books;

}

Console.WriteLine("The fine for {0} book(s) for {1} day(s) is {2}", books, d, amt);

}

}

Explanation:

You might be interested in
JAVA
Umnica [9.8K]

import java.util.Scanner;

public class JavaApplication58 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter a positive integer:");

       String num = scan.nextLine();

       for (int i = num.length()-1; i >=0; i--){

           System.out.println(num.charAt(i));

       }

       

   }

   

}

I hope this helps!

5 0
3 years ago
Threads can only be added to cylindrical faces.<br> O True<br> O False
Nikolay [14]

Answer:

I would say false

Explanation:

Threads can be add to anything there is no say in where you should add the thread and into what

4 0
3 years ago
On the classic gameshow The Price Is Right, contestants must guess the price of an object (guesses are distinct). The winner is
Kruka [31]

Answer:

The program code is in explaination

Explanation:

Program code below.

def judge(auction,price):

"""

Function: Returns Name who auctioned very near to give price

Input :

auction : list of tuples

price : auction price

output: returns name of best auction amount holder

"""

diff = [] #storing differences between auctionist amount and price

count = 0

for each_pair in auction:

if each_pair[1]<=price:

diff.append(price-each_pair[1])

else:

count+=1

diff.append(each_pair[1])

if count == len(auction): #check for if no one have auctioned good amount

return None

else:

more_possibility_index = diff.index(min(diff)) #finding index of best amount from diff list

return auction[more_possibility_index][0]

auction = [('Alice',430),('Bob',538),('Carol',487),('David',550)]

price = 520

print(judge(auction,price))

I kept the output at the attachment.

3 0
3 years ago
A computer _________________ is a text file that a computer can understand
Gekata [30.6K]

Answer:

A computer ___Task__ is a text file that a computer can understand

6 0
3 years ago
Why did it take hundreds
levacccp [35]
Before that there was no way for the image to be recorded and fixed on a surface
5 0
3 years ago
Other questions:
  • . Stress can affect not only your health, but also other aspectsof your
    15·1 answer
  • What is the approximate area of the figure? A. 129 square inches B. 113 square inches C. 110 square inches D. 44 square inches
    15·1 answer
  • An ____ is a collection of tools, features, and interfaces that enables users to add, update, manage, access, and analyze the co
    10·1 answer
  • You have created a PivotChart showing sales by quarter by sales rep. Before presenting it to management, you notice thename of a
    7·1 answer
  • . Which of the following is NOT a valid declaration for a character string?
    6·1 answer
  • What type of software testing is generally used in Software Maintenance?
    11·1 answer
  • How are programs and algorithms related? A program is a part of an algorithm. They are not connected at all. An algorithm is a p
    12·1 answer
  • Hellpppppppppppppppp
    13·2 answers
  • ____ uses a computer to design and test new products and modify existing ones. Computer-aided manufacturing Just-in-time design
    8·1 answer
  • What is technology?5points​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!