![Tyrant4life](/avatars/24505.jpg)
Tyrant4life
28.06.2019 •
Computers and Technology
Write a function wordscramble that will receive a word in a string as an input argument. it will then randomly scramble the letters and return the result. here is an example of calling the function: > > wordscramble('fantastic') ans = safntcait
Solved
Show answers
More tips
- S Sport How to wrap boxing hand wraps? Everything you need to know!...
- F Family and Home How to Sew Curtain Tapes: Best Tips from Professionals...
- A Animals and plants How to Grow Lime from a Seed: Simple Tips and Interesting Facts...
- C Computers and Internet How to Create a Folder on Your iPhone?...
- G Goods and services How to sew a ribbon: Tips for beginners...
- F Food and Cooking How to Make Mayonnaise at Home? Secrets of Homemade Mayonnaise...
- C Computers and Internet Which Phone is Best for Internet Surfing?...
- F Food and Cooking Everything You Need to Know About Pasta...
- C Computers and Internet How to Choose a Monitor?...
- H Horoscopes, Magic, Divination Where Did Tarot Cards Come From?...
Answers on questions: Computers and Technology
- C Computers and Technology Why does my recent tabs are not closing even after the 2 or 3 times exit...
- C Computers and Technology Given A=1101 and B=1001. What is the result of the boolean statement: AAND B...
- C Computers and Technology Will social media lose its relevance?...
- M Mathematics Fill in the table using this function rule. y = 19-3x X 2 3 5 6...
- C Chemistry The product of quotient of measurement should have the ¬¬¬ number of significant figures as the least precise measurement. (You must count significant figures….¬¬¬ decimal...
- M Mathematics A list has 10 numbers. Each number is a 1, 2, or 3. The average is 2 and the SD is 0. What is the list?...
- M Mathematics Which statement BEST describes the relationship between whole numbers and natural numbers shown in the diagram? A) B) The diagram shows that whole numbers are a subset of...
- M Mathematics What are the coordinates of point F? D 3 B 2 С --4 - 3 -2 -1 0 2 3 4 -1 - 2 -3 -4...
- C Computers and Technology Timeliness is an important goal of any access control monitoring system. A. True B. False...
- M Mathematics What is the ratio between 10 lions and14 tigers...
Ответ:
You can use the function randperm() to generate a random permutation of the indexes. so then you would use the random permutation to reorder the string array
Explanation:
Ответ:
The code is given below in Java with appropriate comments
Explanation:
//declaring the imports
import java.util.Scanner;
//class FormatName
public class FormatName {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
//inputing the names
System.out.print("Enter your name (first middle last): ");
String fullName = scanner.nextLine();
String[] names = fullName.split("\\s+");
//applying the formatting
if (names.length == 2) {
System.out.println("Formatted Name: " + names[1] + ", " + names[0]);
} else if (names.length == 3) {
System.out.println("Formatted Name: " + names[2] + ", " + names[0] + " " + names[1].charAt(0) + ".");
} else {
System.out.println("The input does not have correct form");
}
}
}