Answer:
import java.io.*;
public class Larger {
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));// reading input from buffered reader
int a,max=-99999,i;
for(i=1;i<=5;i++)
{
a=Integer.parseInt(br.readLine());//converting string input string to int
if(a >max)
max=a;
}
System.out.println("Maximum value : "+max);
}
Explanation:
Answer:
while (quantity >= 50)
Explanation:
Required
Stop when quantity is less than 50
To do this, we make use of a while statement and the syntax is:
while (condition){ }
If the loop should stop when quantity is less than 50; then it means the loop would continue when quantity is greater or equal to 50
So, we have:
while (quantity >= 50)
So that they can lower the I2R losses
It all depends on what you're doing online.
Answer:
b.used is 2, b.data[0] is 4, b.data[1] is 6
Explanation:
bag b;
b.insert(5); // b has 5
b.insert(4); // b has 5,4
b.insert(6); // b has 5,4,6
b.erase_one(5); // now 5 is removed , b has 4,6
so no:of elements b.used is 2
b[0]=4;
b[1]=6;