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:
The code will produce:-
2.4
Explanation:
In this code the result of the arithmetic operation is stored in the variable c.On evaluating the expression it divides 12.0 by 5 which results in 2.4 and it is stored in float variable c.Then it is printed on the screen using print statement.Since the c is double variable so the result will be a decimal number.
Hence the answer is 4.
Answer:
True
Explanation:
Media coding is the procedure of defining the Media codes, written symbolic and technical tools that are applied to construct or come up with the meaning in various media products or forms. It includes the proper use of the camera, setting, acting, editing, special effects, sound, color, text, visual composition, graphics, typography, and mise en scene. Hence, the fact mentioned in the question is true.
Answer:
PLS programming language supporting.
Explanation:
Answer:
one, because the consumers of news are no longer interested in worlwide events, but rather on events that are happening close to them, and in a form affect them directly, and second, because it is cheaper to cover gossip, and it generates more profitability for media broadcasters, than speaking about events that have no impact on people´s interests.