import java.util.Scanner;
public class U2_L3_Activity_Four {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter a sentence.");
String sent = scan.nextLine();
int count = 0;
for (int i = 0; i < sent.length(); i++){
char c = sent.charAt(i);
if (c != ' '){
count++;
}
else{
break;
}
}
System.out.println("The first word is " + count +" letters long");
}
}
We check to see when the first space occurs in our string and we add one to our count variable for every letter before that. I hope this helps!
Answer:
Input, output, storage.
Explanation:
Input is used to interact with, or send data to the computer (mouse, keyboards, etc.). Output provides output to the user from the computer (monitors, printers, etc.). And storage which stores data processed by the computer (hard drives, flash drives, etc.).
Answer: Geotagging was enabled on her smartphone
Explanation:
The security weakness that is the most likely cause of the security breach is that geotagging was enabled on the vice president's smartphone.
Geotagging, occurs when geographical identification metadata are added to websites, photograph, video, etc. Geotagging can be used to get the location of particular place.
In this case, since geotagging was enabled on her smartphone, it was easy for the attacker to locate her house.