#include <iostream>
#include <string>
#include <cmath>
#include <fstream>
#include <stdio.h>

//#pragma warning(disable:4996) //汚い・・・。Orz

std::string MakeHeader(){
	std::string str;

	str = "<head>";
	str += "<title>こんなんでいいんですかね？？</title>";
	str += "</head>";

	return str;
}
std::string MakeBody(){
	std::string str;
	char Buf[1024];

	str = "<body>";
	
	for (int i = 0; i < 180; i++){
		str += "<hr width=\"";
		std::sprintf(Buf, "%d", static_cast<int>(100 * std::sin((i)*(3.1415926463 / 180.0))));
		str += Buf;
		//str += _itoa(static_cast<int>(100*std::sin((i - 45)*(3.1415926463 / 180.0))), Buf, 10);
		str +="\">";
		str += "\n";
	}

	str += "</body>";
	
	return str;
}

std::string CreateHTML(){
	std::string str;

	str = "<html>";
	str += MakeHeader();
	str += MakeBody();
	str += "</html>";

	return str;
}

bool Write(std::ostream& os, std::string& str){
	os << str;
	return true;
}

int main(){
	std::string str = CreateHTML();
	std::ofstream ofs("hoge.html");

	Write(std::cout, str);
	//Write(ofs,str);

	return 0;

}