您的位置:首页 > 其它

#include <stdlib.h> ... arc4random_uniform(100); 0-99的 随机数..do while & while

2016-01-04 16:00 393 查看
int isCouple = 0;
int count = 0;
do {
printf("表白...\n");
count++;
if (count == 100) {
isCouple = 1;
}

} while (!isCouple);

printf("=================================\n");

isCouple = 0;
count = 0;
while (!isCouple) {
printf("表白...\n");
count++;
if (count == 100) {
isCouple = 1;
}
}

//    int aa = 0;
//    for (;aa != 99;) {
//        aa = arc4random_uniform(100);
//        printf("%d\n", aa);
//    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: