The smallest you should have is PROBABLY 24 points. Anything below that is going to strain the audience's eyes! However, the title text can be a bit bigger, around 36 and then for text anything around 24-26 should work!
Answer:
import java.util.Scanner;
public class num10 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter a word");
String word = in.nextLine();
String reversed = "";
//Get the length of the string entered
int length = word.length();
//Loop through the string and reverse th string
for ( int i = length - 1; i >= 0; i-- )
reversed = reversed + word.charAt(i);
//Compare the two strings "word" and "reversed"
if (word.equals(reversed))
System.out.println(word+" is a palindrome");
else
System.out.println(word+" is not a palindrome");
}
}
Explanation:
Since we know that a palindrome word is a word that reads the same forward and backward, The Idea here is:
- To obtain a word from a user.
- Use a for loop to reverse the word and store in another variable
- Use if....else to compare the two strings and determine if they are equal, if they are equal then the word is palindrome.
Answer:
I am writing a C++ program. Let me know if you want the program in some other programming language. Here is the portion of the code:
if((userItem == GR_APPLES) || (userItem == GR_BANANAS)){
cout << "Fruit"; }
else if((userItem == GR_JUICE) || (userItem == GR_WATER)){
cout << "Drink"; }
else{
cout << "Unknown"; }
cout << endl;
Explanation:
The IF statement is used to check the defined options with the value in the userItem.
If the value of the userItem is GR_APPLES OR GR_BANANAS then Fruit is printed as the output. || represents a logical operator OR so this means that userItem can be either the GR_APPLES or GR_BANANAS for the If condition to evaluate to true.
If the above condition evaluates to false then the else-if part will be checked next. So the else if checks if the value in the userItem is GR_JUICE or GR_WATER. If userItem contains either of these two then Drink is displayed on the screen as output.
If the else-if statement also evaluates to false then the else part is executed which displays Unknown.
The cout<< endl; statement in the last is used to print the new line. For example if the output is Unknown then it is followed by a new line.
In the given program userItem is set to GR_APPLES
GroceryItem userItem = GR_APPLES
So the output of the whole program is Fruit followed by a new line.
The screenshot of the code along with the output is attached.
One tab=8 spaces...........
The command tool that is not in the Page Design tab is the specification of a color scheme.
<h3>What is Page Design Tab?</h3>
A Page Design Tab is a Tab on Design software used for the purpose of creating and editing designs.
The Page Design tab involves a variety of tools and commands that can be used to achieve and complete the required designs.
Some of these tools are:
- The text field area
- The Print button
- The table layout
The command tool that is not in the Page Design tab is the specification of a color scheme. The color scheme can be seen in the fill area.
Learn more about Page design Tab here:
brainly.com/question/18508988