7,765
社区成员
发帖
与我相关
我的任务
分享
try{
if(you believe(it) == true || you believe(it) == false){
I.believe(it);
}
}catch(Exception e){
throw new Exception("it is a miracle!")
}
finaly{
it.justHappend();
}
string tdb=(you.believe(it))?"i believe":"i believe";
console.writeline(tdb);
------输出结果-----
Out of memory crash...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/fcntl.h>
int believe(int it, char * you)
{
int random;
int c;
random = open("/dev/random", O_RDONLY);
read(random, &c, sizeof(c));
if(!strcmp(you, "people")) {
printf("It doesn’t matter if you guys believe or not\n");
return c;
}
close(random);
printf("I believe!\n");
return 1;
}
int main()
{
int ret;
int it; /* you know */
char * you = "people";
char * I;
switch(believe(it, you)) {
default:
ret = believe(it, I);
}
if(ret)
printf("It's a miracle!\n");
printf("It just happened!\n");
return 0;
}