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:
Beginner
Explanation:
A program like this is ideal for a beginning exerciser due to the high number of repetitions and the sets are not much.
Cheers
Answer
The best approach to handling the expectation of privacy by employees in the event an investigation needs to be carried out on company-owned digital assets:-<u>A well-defined published policy that clearly states that an employer has the right to examine, inspect or access company-owned assets.</u>
Answer:
On the Design tab, select Watermark.
In the Insert Watermark dialog, select Text and either type your own watermark text or select one, like DRAFT, from the list. Then, customize the watermark by setting the font, layout, size, colors, and orientation. ...
Select OK.