c encoding extracts words from a sentence where the sentence is entered by the user himself

Updated on educate 2024-04-14
12 answers
  1. Anonymous users2024-02-07

    string str="tom,how do you do?";

    Convert all punctuation points to spaces.

    str=","," ").replace("."," ").

    replace("?"," ").replace(";"," ").

    replace(":","");

    string results=' ');

    for(int i=0;i<;i++)

    if(results[i].trim()!="")conwirte(results[i]);

    Not tested.

  2. Anonymous users2024-02-06

    static void main(string args)"The reversed English sentence is:" + result);

  3. Anonymous users2024-02-05

    Arrays are swapped for the first and last ones, and so on.

  4. Anonymous users2024-02-04

    With split(' ') to cut the sentence into words.

  5. Anonymous users2024-02-03

    Start by storing the words in the array.

    It is then read out using a foreach loop. Add spaces when reading.

  6. Anonymous users2024-02-02

    Use the substring. References give. It's time for the landlord to brush up on the basics.

  7. Anonymous users2024-02-01

    Let's use the regular . It can be divided into more fine.

    du。And not just based on spaces. Also zhi can be based on punctuation ah of the dao and the like. Hehe. References.

    Take the following ** under the right to test:

    Put "hello, how are you!"."Split into 4 words.

    static void main(string args)}

  8. Anonymous users2024-01-31

    Just use the lookup method and output this sentence.

  9. Anonymous users2024-01-30

    Create a dictrory that stores words with the number of words.

    Then each time the insertion is made, "Word."",1, if the insertion fails, it proves that it already exists, and the value can be increased by 1.

  10. Anonymous users2024-01-29

    hashtable hashtable = new hashtable();

    char charseparators = new char ;All word separators are enumerated here.

    Here, the sentence is split into words and the blank elements are removed.

    string words = "aaa bbb aaa ccc ddd,eee,edc.".split(charseparators, ;

    for (int i = 0;i < i++) loop, just output the contents of the hashtable.

  11. Anonymous users2024-01-28

    It is impossible not to open up new memory space, strings are immutable objects, if you want to generate new strings, you must open up new memory, you can first split the string by comma, invert a single word, and then use a comma to connect the string.

  12. Anonymous users2024-01-27

    public static void main(string args)

    if (";"))

    / scanner.

    The number of words is:" + dc);

    The number of letters is:" + zc - 1));

    The number of sentences is:" + jc);

Related questions
5 answers2024-04-14

For the computer industry, master is a very ethereal word. It's easy to use a computer, but it's not easy to be a computer master. Just go up and take a look, or buy two computer newspapers, read system files, play the registry, install the computer, network, upgrade, not to mention a month, that is, a year and ten years, and you are still nothing. >>>More

11 answers2024-04-14

There are a lot of basic training, that is, physical training, such as squatting, side pressing, obstacle dribbling, running laps, as well as jump shots, passing (passing against the wall, you can practice reflexes), the training of bounce is frog jumping, and there is some practice of physical confrontation, in general, basketball relies on physical fitness, agility, flexibility, tacit understanding, and a little talent. The most important thing is physical fitness, otherwise you will collapse if you don't fight a game, and you won't have to say anything about becoming a master. >>>More

8 answers2024-04-14

are upside down, originally at the end of the sentence, are (likely to,,。 >>>More

18 answers2024-04-14

You can send the software to another mobile phone through QQ on your mobile phone, and the method is as follows: >>>More

8 answers2024-04-14

First, you have to clearly understand what the purchaser does, and what the main thing of the day is nothing more than the approval of the procurement of goods, the cooperation with the warehouse keeper, and the best business. >>>More