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
bagirrra123 [75]
2 years ago
6

What is the output for the following program?

Computers and Technology
1 answer:
murzikaleks [220]2 years ago
6 0

Answer:

13

Explanation:

int numA = 4;

whilie (numA < 12){

  numA += 3;

}

System.out.print(numA);

numA          numA < 12

  4                   true <em>⇒ numA increases by 3, loop continues </em>

  7                   true <em>⇒ numA increases by 3, loop continues </em>

  10                 true<em> ⇒ numA increases by 3, loop continues</em>

  13                 false <em>⇒ loop stops, program them prints out value of numA </em>

You might be interested in
Write a program that uses the Purchase class in 5.13. Set the prices to the following: Oranges: 10 for $2.99 Eggs: 12 for $1.69
Xelga [282]

Answer:

Explanation:

The following program is written in Java. Using the program code from Purchase class in 5.13 I created each one of the fruit objects. Then I set the price for each object using the setPrice method. Then I set the number of each fruit that I intended on buying with the setNumberBought method. Finally, I called each objects getTotalCost method to get the final price of each object which was all added to the totalCost instance variable. This instance variable was printed as the total cost of the bill at the end of the program. My code HIGHLIGHTED BELOW

//Entire code is in text file attached below.

//MY CODE HERE

       DecimalFormat df = new DecimalFormat("0.00");

       oranges.setPrice(10, 2.99);

       oranges.setNumberBought(2*12);

       eggs.setPrice(12, 1.69);

       eggs.setNumberBought(2*12);

       apples.setPrice(3, 1);

       apples.setNumberBought(20);

       watermelons.setPrice(1, 4.39);

       watermelons.setNumberBought(2);

       bagels.setPrice(6, 3.50);

       bagels.setNumberBought(12);

       totalCost = oranges.getTotalCost() + eggs.getTotalCost() + apples.getTotalCost() + watermelons.getTotalCost() + bagels.getTotalCost();

       System.out.println("Total Cost: $" + df.format(totalCost));

   }

}

5 0
2 years ago
What are smart mobile devices
Nezavi [6.7K]

portable computing tool

7 0
3 years ago
A musician has recorded some initial ideas for new songs which she wishes to share with her bandmates. As these are initial idea
Ugo [173]

Answer:

1.save the audio using a low sampling rate

2.save the audio using a low bit depth

Explanation:

1. if the quality of the audio is low then the size of the audio will also be low and which will make the size of the data to be less and also easier to download

3 0
3 years ago
Is mayonnaise technically an instrument?
stich3 [128]
No it doesn’t count as an instrument
7 0
3 years ago
Can Anybody Answer This For Me ?
AlladinOne [14]

Answer:

I'm pretty sure its 3 only (c) III only gimme brainliest

3 0
3 years ago
Other questions:
  • Query: [mcdonalds Austin] Viewport: Fresh User Location: within Houston, TX Result Returned: McDonalds location in a neighboring
    7·1 answer
  • Shakespeare’s complete works have approximately 3.5 million characters. Which is bigger in file size: Shakespeare’s complete wor
    5·2 answers
  • 60 POINTS!
    13·1 answer
  • why is there a need of properly interpreting teacher's/manufacturer's specifications before operating any food processing equipm
    9·1 answer
  • What output is generated by this for loop?
    6·1 answer
  • What is difference between base font and font tags​
    13·1 answer
  • Write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space
    13·1 answer
  • Im lonellly whos down to date me
    7·2 answers
  • What are the two types of electronic components
    15·2 answers
  • and assuming main memory is initially unloaded, show the page faulting behavior using the following page replacement policies. h
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!