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
juin [17]
4 years ago
13

Write a method named quarterstodollars. the method should accept an int argument that is a number of quarters, and return the eq

uivalent number of dollars as a double. for example, if you pass 4 as an argument, the method should return 1.0; and if you pass 7 as an argument, the method should return 1.75.

Computers and Technology
2 answers:
enyata [817]4 years ago
7 0
 public static void quarterstodollars(String[] args) {    Scanner input = new Scanner(System.in);    System.out.println("Enter number of Quarters:");
    System.out.print("Quarters:");    int Q1 = input.nextInt();
DecimalFormat fmt = new DecimalFormat("$#,###.##");    System.out.println("Total:"+fmt.format(calctotal(Q1)));}public static double calctotal(int Q1) {    double total;    total=(0.25 * Q1);    return (total);}

Hope this helps!
Stolb23 [73]4 years ago
7 0

Answer:

def quarterstodollars():

   quarters = float(input('Enter Quarter: '))

   dollar = quarters / 4

   return dollar

print(quaterstodollars())

Explanation:

Programming language used is Python.

The program starts by first defining the function using the def keyword.

It then prompts the user to enter a quarter, the input is converted to a floating type number and it is stored in the quarters variable.

To calculate the dollar equivalent, the quarter is divided by 4.

Finally, the dollar value is returned.

The last line calls the method. check image to see the result.

You might be interested in
How exactly do I answer questions?
pshichka [43]

Answer:

If you mean this website, click the add answer button on the question

Explanation:

8 0
2 years ago
An Excel formula always begins with a(n) ____.
Basile [38]
Every Excel formula begins with '=' (equality) sign.
7 0
3 years ago
The jetliner has allowed for all of the following, except
Bad White [126]
The best and most correct answer among the choices provided by the question is the first choice "miniaturization"<span>

A jet airliner (or jetliner<span>, or jet) is an airliner powered by jet engines (passenger jet aircraft). Airliners usually have two or four jet engines; three-engined designs were popular in the 1970s but are less common today.
</span>
I hope my answer has come to your help. God bless and have a nice day ahead!</span>
7 0
3 years ago
How do Responsive Display Ads use automation? a. Responsive Display Ads use a machine-learning model to create an advertiser's a
Helen [10]

Answer:

Option D.

Explanation:

Responsive display ads replace adaptable advertising as that of the basic ad form for the Viewing Network. These could be used for both regular show campaigns and Mobile Viewing campaigns. Export the resources such as pictures, titles, icons, clips, and representations to develop a responsive display ad and Google will generate advertisements to be viewed on a Google Display Network.

So, Responsive Display Ads will be using a machine-learning model using forecasts performance-based history of an advertiser to assess optimum assets with each ad slot.

7 0
3 years ago
Write a program which takes a string input, converts it to lower case, then prints the same string with all vowels (a, e, i, o,
kondor19780726 [428]

import java.util.Scanner;

public class JavaApplication66 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter String:");

       String vowels = "aeiou";

       String text = scan.nextLine();

       text = text.toLowerCase();

       String newText = "";

       

       for (int i = 0; i < text.length(); i++){

           char c = text.charAt(i);

           if (vowels.indexOf(c) == -1){

               newText += c;

           }

       }

       System.out.println(newText);

   }

   

}

This works for me. Best of luck.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which examples demonstrate appropriate use of media for a school project? Check all that apply. showing cartoons to teach about
    6·2 answers
  • What is the most common way for computing systems and devices to authenticate a person’s identity? citi
    10·1 answer
  • On what basis can you categorize the generations of computers?
    11·1 answer
  • David Doe is a network administrator for the ABC Company. David is passed over for promotion three times. He is quite vocal in h
    14·1 answer
  • What are the differences between the various EHRs?
    9·1 answer
  • Dereck works for long hours on his computer. He frequently experiences physical strain by the end of the day because he does not
    8·2 answers
  • A celebrity blogger you have followed for years advises readers to try a new beauty product. Before purchasing the product, a sa
    10·1 answer
  • Write a script that checks to see if at least one argument has been given on the command line and tests whether the argument is
    5·1 answer
  • Need answer ASAP!!!!
    7·1 answer
  • How do I find unwanted programs on my computer?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!