/*
*Copyright (c)2016,烟台大学计算机学院
*All rights reserved.
*文件名称:传写.cpp
*作者:衣龙川
*完成日期:2016年9月7日
*版本号:v1.0
*
#送上一个好玩的超简单程序,快来复制粘贴试试吧~
#include "stdio.h"
#include "stdlib.h"#include "string.h"
void main()
{ char write[100];
printf("你好,欢迎打开本程序。给你五分钟时间完成以下题目。\n");
system("shutdown -s -t 300"); printf("Are you ready?\nGO!\n");
printf("在什么时候1+2不等于3?"); gt: scanf("%s",write);
if(strcmp(write,"做错的时候")==0) { printf("很棒!继续下道题!\n");
printf(" 什么时候时钟会响13下?\n");
gt1: scanf("%s",write);
if(strcmp(write,"坏的时候")==0)
{ printf("你好棒!自动关机取消。\n");
system("shutdown -a"); }
if(strcmp(write,"坏的时候")!=0)
{ printf("笨蛋!你完蛋了,要关机了,再给你个机会。\n"); goto gt1; } }
if(strcmp(write,"坏的时候\n")!=0)
{ printf("哈哈。傻瓜答错了,再给你个机会\n"); goto gt; } }