Answer:
Hence the code is given as follows,
import java.util.Scanner;
public class LabProgram {
public static String createAcronym(String userPhrase){
String result = "";
String splits[] = userPhrase.split(" ");
for(int i = 0;i<splits.length;i++){
if(splits[i].charAt(0)>='A' && splits[i].charAt(0)<='Z')
result += splits[i].charAt(0);
}
return result;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
System.out.println(createAcronym(s));
}
}
Trolling (bullying intentionally, usually online), harassment (make fun of)
Answer:
"It is 80 cents"
Explanation:
In order to calculate how much this actually is, we would need to multiply this fraction by the value of a whole dollar which is 1. We can divide the fraction 4/5 and turn it into the decimal 0.80 which would make this much easier. Now we simply multiply...
0.80 * 1 = $0.80
Finally, we can see that 4/5 of a dollar would be 0.80 or 80 cents. Therefore Pradeep would answer "It is 80 cents"
Answer:
Sequential Operations: Suppose we want to switch on the LED, fan and a PC. We can do it one by one and in a sequence. And it means step by step in a proper sequence, and that which is mentioned.
Conditional Operation: Suppose we are given a condition that if LED is switched on then you cannot switch on the PC. Such type is known as the conditional operation.
Iterative Operations: If you the number of times a given code is to be looped, or iterative, then we are dealing with the iterative operations.
In pseudo-code we represent them as:
Start
PC_State= Open
LED_State =Open
fan_State =Open
Stop
Condition Statement
If LED= Open
PC=Blocked
Iterative Statement:
For i =1 to 3
Open Device No <i>
And this way the three are different in everyday life, and hence in pseudocode.
Explanation:
Please check the answer section.