Answer:
Following are the responses to the given question:
Explanation:
Let P become the number of puppies just on the portal who've already received at least one like.
Similarly, the number of households with no household pet and those who are in search of a puppy is R.
We'll have a chart of citizens who liked a puppy p in P now. As a consequence, we will be having -
So p1 is a puppy that r1 and r2 want. (number puppy liked) was its amount of puppies that r1 has enjoyed.
Algorithm
- Sort the puppies (p1,p2,..) from set P in an attempt about how many likes those who got from the citizens.
- If a puppy only receives one like, give it over to the resident who's closest to it. Remove the puppy from the registry of residents too though.
- After tenants have indeed been withdrawn, sort the collection once more and repeat steps 2.
- When there isn't a puppy left for a single citizen, assign one to the resident with both the fewest like. For example, if p = r1(2), r2(4), Assign puppy p to r1 in this situation, as it only has two likes remaining. Delete r1 from the puppy's bookmarks folder then repeat phase 3 as r1 has been deleted again.
- Reply steps 3 and 4 until the number of puppies left is zero or the tenant's total is zero.
Answer:
=F5*$F$12+F5
Explanation:
If we want to increment the salaries in the cell F5, we must multiply the cell F5 by cell F12, and then we must sum that result.
If we want to drag the formula from the cell F5 to F10, we must use the dollar symbol $ to apply the same percent in our formula.
For example:
F12 = 5% = 0.05
F5 = 10,000
=F5*$F$12+F5
=10,000×0.05+10,000 = 10,500
Answer:
if(goodsSold>500000){
bonus = 10000;
}
Explanation:
A complete Java program that prompts user to enter value for goodsSold is given below:
<em>import java.util.Scanner;</em>
<em>public class num14 {</em>
<em> public static void main(String[] args) {</em>
<em> Scanner in = new Scanner(System.in);</em>
<em> System.out.println("Enter goods Sold: ");</em>
<em> int goodsSold = in.nextInt();</em>
<em> int bonus =0;</em>
<em> if(goodsSold>500000){</em>
<em> bonus=10000;</em>
<em> }</em>
<em> System.out.println("You bonus for "+goodsSold+" is "+bonus);</em>
<em> }</em>
<em>}</em>
Exercise is a subset of physical fittness