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
iVinArrow [24]
3 years ago
11

printLarger is a method that accepts two int arguments and returns no value. Two int variables, sales1 and sales2, have already

been declared and initialized. Write a statement that calls printLarger, passing it sales1 and sales2. Assume that printLarger is defined in the same class that calls it.
Computers and Technology
1 answer:
gizmo_the_mogwai [7]3 years ago
6 0

Answer:

<em>public static void printLarger(double sales1, double sales2){</em>

<em>        if (sales1>sales2){</em>

<em>            System.out.println(sales1+" is larger");</em>

<em>        }</em>

<em>        else {</em>

<em>            System.out.println(sales2+" is larger");</em>

<em>        }</em>

<em>    }</em>

<em>A complete code calling the printLarger method is given below</em>

Explanation:

<em>public class Larger{</em>

<em>    public static void main(String[] args) {</em>

<em>        int sales1 = 100;</em>

<em>        int sales2 = 120;</em>

<em>        printLarger(sales1,sales2);</em>

<em>    }</em>

<em>public static void printLarger(int sales1, int sales2){</em>

<em>        if (sales1>sales2){</em>

<em>            System.out.println(sales1+" is larger");</em>

<em>        }</em>

<em>        else {</em>

<em>            System.out.println(sales2+" is larger");</em>

<em>        }</em>

<em>    }</em>

}

You might be interested in
Good day Statistical Methods tutor , I would like to know the formula for calculating the percentage of stockouts for the given
sveticcg [70]

In order to derive the probability of stock outs, divide the total value of the stock outs by the number of requests demanded. The resulting figure must then be multiplied by 100.

<h3>What is a stock out?</h3>

In business, a stock out refers to a condition where in a certain item or items are no longer available in stock.

The formula can be sated simply as:

Probability of Stock outs = (No of stock outs/ number of demand requests) x 100

Thus Number of Stock outs = Total probability of stock outs * total number of demand requests.

<h3>What is the formula for the Total Cost?</h3>

The formula for Total Cost is given as:

Total Fixed Cost + Total Variable Cost;

TC = TFC + TVC

Learn more about stock outs at:
brainly.com/question/16209393
#SPJ1

5 0
2 years ago
How to study program ?
CaHeK987 [17]
I don’t understand how this question can u explains more or be a little more specific please.
6 0
3 years ago
Ken is a table busser at a restaurant. Ken's boss has requested that instead of waiting to be told what tables need to be cleane
Vsevolod [243]
Ken can improve his initiative
5 0
3 years ago
Read 2 more answers
Which code snippet could be used to print the following series?
GaryK [48]
C is the answer, I think
7 0
1 year ago
Create an array to hold the rainfall values. Create a 2nd parallel array (as a constant) to hold the abbreviated names of the mo
Zarrin [17]

Answer:

#include <stdio.h>

int main()

{

//variable declaration

int low, high;

float lowRain, highRain, total, avg;

 

//array declaration

float rainfall[13];

char monthName[13][10] = {"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

//get user input

for(int i=1; i<=12; i++)

{

printf("Enter the rainfall (in inches) for %s: ", monthName[i]);

scanf("%f", &rainfall[i]);

}

 

//display the monthly rainfall

printf("\nThe rainfall that was entered was:\n");

for(int i = 1; i<=6; i++)

printf("%s ", monthName[i]);

printf("\n");

for(int i = 1; i<=6; i++)

printf("%.1f ", rainfall[i]);

printf("\n");

for(int i = 7; i<=12; i++)

printf("%s ", monthName[i]);

printf("\n");

for(int i = 7; i<=12; i++)

printf("%.1f ", rainfall[i]);

 

//variable initialization

low = 1;

high = 1;

lowRain = rainfall[1];

highRain = rainfall[1];

total = 0;

 

//calculate the lowest, highest and averaage rainfall

for(int i=1; i<=12; i++)

{

if(lowRain>rainfall[i])

{

lowRain = rainfall[i];

low = i;

}

if(highRain<rainfall[i])

{

highRain = rainfall[i];

high = i;

}

total = total + rainfall[i];

}

 

avg = total / 12;

 

//display the result

printf("\n\nThe total rain that fell was %.1f inches", total);

printf("\nThe average monthly rainfall was %.1f inches.", avg);

printf("\nThe lowest monthly rainfall was %.1f inches in %s.", rainfall[low], monthName[low]);

printf("\nThe highest monthly rainfall was %.1f inches in %s.", rainfall[high], monthName[high]);

return 0;

}

4 0
3 years ago
Other questions:
  • Alison is entering text in a Word document. As she is entering data, where will the cursor move in relation to the text she is t
    6·1 answer
  • Data mining must usestatistics to analyze data.<br> True<br> False
    12·1 answer
  • Define Turbo C++ and how is the use of Turbo C++.?
    15·1 answer
  • Who has gotten a random file link from someone? What file does it contain?
    8·2 answers
  • Keli is unable to find a shape that meets her needs. Which feature in Power Point should she use to create shapes that are compl
    6·1 answer
  • What is string literal in Java?
    5·1 answer
  • GRAND THEFT AUTO 5 LOLLL
    15·2 answers
  • You arrive at school on Friday for a field trip ! What a lucky day!You need to figure out what room you are in before leaving. Y
    9·2 answers
  • The different languages that follow specific RULES. These languages use commands
    9·1 answer
  • What is one way a pivottable could combine the following data?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!