zoj1099html_2
本文最后更新于 1830 天前,其中的信息可能已经有所发展或是发生改变。
#include "stdafx.h"
#include<stdio.h>
#include<string.h>

int main()
{
	char chars[81];
	int num = 0;
	int i, temp;
	while (scanf("%s", chars) != EOF)
	{
		if (strcmp(chars, "<br>") == 0)  /* 遇到换行符的时候 */
		{
			printf("\n");
			num = 0;
		}
		else if (strcmp(chars, "<hr>") == 0)  /* 遇到输出一行-的时候 */
		{
			if (num != 0) /* 假如不是刚好换行的地方 */
				printf("\n");
			for (int j = 0; j<80; j++)
				printf("-");
			printf("\n");
			num = 0;
		}
		else
		{
			temp = strlen(chars);
			if (temp + num >= 80)
			{
				printf("\n");
				num = 0;
			}
			if (num != 0)
			{
				printf(" ");  /* 空格也在统计范围之内 */
				num++;
			}
			printf("%s", chars);
			num += temp;
		}
	}
	return 0;
}

作者:Yuyy
博客:https://yuyy.info
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇