题解 | #HTTP状态码#

HTTP状态码

http://www.nowcoder.com/practice/99dba043761e43c2a6f931e2c5c247c7

#include <stdio.h>

int main() { int http = 0;

while (scanf("%d", &http) != EOF)
{
    if (http == 200)
        printf("OK\n");
    else if (http == 202)
        printf("Accepted\n");
    else if (http == 400)
        printf("Bad Request\n");
    else if (http == 403)
        printf("Forbidden\n");
    else if (http == 404)
        printf("Not Found\n");
    else if (http == 500)
        printf("Internal Server Error\n");
    else
        printf("Bad Gateway\n");
}
return 0;

}

全部评论

相关推荐

不愿透露姓名的神秘牛友
昨天 18:19
个个985的硕士闭着眼睛都有15k以上的月薪,天天嚷嚷着研究生白度读了,天天嚷嚷着反向读研了........
MMMJC:不读研22本科出去的基本都拿28k呢,你不能用25的研究生和25的本科生比然后说没反向读研,而是25研和22本比呀
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务