Fun games to test what you have done

Source: Internet
Author: User
Tags random sentences

We can use a set to perform this interesting test, input the names of one or two people, and the system automatically generates a sentence. Some words in this sentence are randomly combined, in this way, the random sentences are interesting.

First, control the game to start:

The following defines several sets and stores the compiled statements used to form a sentence:

Start to enter the names of two people, which are stored in name1 and name2 respectively:

Then, the random number generator is used to generate a random number between 0 and 7 because each part of the sentence has eight elements. Here we define five sets to generate five random numbers at a time, put N [] into the array, and then use the array n [] for the display operation:

Now the game is created.

Game effects include:

Enter name

Test Results

 

This game and its program file download Network Disk:

Http://pan.baidu.com/s/1sjlWM7b

Very interesting. If you are interested, try it out and support Windows 7 and later operating systems.

 

Fun games to test what you have done

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.