//#include<fstream.h>
#include<iostream>
#include<string.h>
#include<stdio.h>
#include<conio.h>
#include<process.h>

using namespace std;

int main()
{
	char name[30],file[30],*blank=".html";
	char temp[200],ch;
	int num=0,len,i,line=1;

	cout<<"Enter Name Of The Database : ";
	gets(name);

	strcpy(file,name);
	strcat(file,blank);
	//ofstream cout(file);

	if(!cout)
	{
		cout<<"Error In Making Of A File :";
		//exit(1);
	}

	cout<<"<html>";
	cout<<"<blockqoute>";
	cout<<"<center>";

	cout<<"<b><h1><u>"<<"CURRICULAM VITAE"<<"</h1></b></u>";
	cout<<"</center>";

	cout<<"Enter Your Name : ";
	gets(temp);
	strcpy(name,temp);
	cout<<"<br><h2>"<<temp<<"<br>";

	cout<<"Enter Your Address : ";
	gets(temp);

	len=strlen(temp);
	for(i=0;i<len;i++)
	{
		ch=temp[i];
		if(ch==' ')
		{
			num++;
			if(num==3)
			{
				cout<<"<br>";
				num=0;
			}
			cout<<ch;
		}
		cout<<ch;
	}


	cout<<"Enter Your Contact Number : ";
	gets(temp);
	cout<<"<br>Contact No : "<<temp<<"<br><br><br>";

	cout<<"Enter Your Objective : ";
	gets(temp);
	cout<<"<u>Objective : </u>";

	len=strlen(temp);
	for(i=0;i<len;i++)
	{
		ch=temp[i];
		if(ch==' ')
		{
			num++;
			if(num==12)
			{
				cout<<"<br>";
				num=0;
			}
			cout<<ch;
		}
		cout<<ch;
	}

	num=0;
	cout<<"<br><br>";
	cout<<"Enter Your Academic Record :";
	cout<<"<u>Academic Record  </u><br>";
	do
	{
	x:cout<<""<<line<<". ";
	gets(temp);
	len=strlen(temp);
	cout<<"<li>";
	for(i=0;i<len;i++)
	{
		ch=temp[i];

		if(ch==' ')
		{
			num++;
			if(num==8)
			{
				cout<<"<br>  ";
				num=0;
			}
			cout<<ch;
		}
		cout<<ch;
	}
	cout<<"If you Want To Add More Information Press * Sign Or Quit To $:";
	cin>>ch;
	line++;
	num=0;
	if(ch=='*')goto x;
	}while(ch!='$');

	line=1;
	num=0;
	cout<<"Enter Your Hobbies : ";
	gets(temp);
	cout<<"<br><br><u>Hobbies : </u>"<<temp;

	cout<<"Languages Known : ";
	gets(temp);
	cout<<"<br><br><u>Languages Known : </u>"<<temp;

	cout<<"Enter Your Experience :";
	cout<<"If You Want To Bypass This Information Press $ Sign Or Any Other Key To Continue : ";
	cin>>ch;
	if(ch=='$')
	{
		goto a;
	}
	else
	{
	cout<<"<br><br><u>Experience  </u>";

	do
	{
	y:cout<<""<<line<<". ";
	gets(temp);
	len=strlen(temp);
	cout<<"<li>";
	for(i=0;i<len;i++)
	{
		ch=temp[i];

		if(ch==' ')
		{
			num++;
			if(num==8)
			{
				cout<<"<br>  ";
				num=0;
			}
			cout<<ch;
		}
		cout<<ch;
	}
	cout<<"If you Want To Add More Information Press A * sign Or Quit To: ";
	cin>>ch;
	line++;
	num=0;
	if(ch=='*')goto y;
	}while(ch!='$');
	}

	line=1;
	num=0;
    a:cout<<"Technical Skills  :";
	cout<<"If You Want To Bypass This Information Press $ Sign Or AnyOtherKey To Continue : ";
	cin>>ch;
	if(ch=='$')
	{
		goto b;
	}
	else
	{
	cout<<"<br><br><u>Technical Skills </u><br>";
	do
	{
	z:cout<<""<<line<<". ";
	gets(temp);
	len=strlen(temp);
	cout<<"<li>";
	for(i=0;i<len;i++)
	{
		ch=temp[i];

		if(ch==' ')
		{
			num++;
			if(num==8)
			{
				cout<<"<br>  ";
				num=0;
			}
			cout<<ch;
		}
		cout<<ch;
	}
	cout<<"If you Want To Add More Information Press A * sign Or Quit To$";
	cin>>ch;
	line++;
	num=0;
	if(ch=='*')goto z;
	}while(ch!='$');
	}

	line=1;
	num=0;
    b:cout<<"In The End Enter Your Personal Details :";

	cout<<"<br><br><u>Personal Details </u><br><br>";

	cout<<"Fathers Name : ";
	gets(temp);
	cout<<"Fathers Name :   "<<temp;

	cout<<"Enter Date Of Birth : ";
	gets(temp);
	cout<<"<br>Date Of Birth :    "<<temp;

	cout<<"Enter Martial Status :";
	gets(temp);
	cout<<"<br>Martial Status :   "<<temp;

	cout<<"Sex :";
	gets(temp);
	cout<<"<br>Sex :&nbsp;        "<<temp;

	cout<<"Permanent Address : ";
	cout<<"<br>Permanent Address : ";
	cout<<"<blockqoute><dl><dd>";
	gets(temp);

	len=strlen(temp);
	for(i=0;i<len;i++)
	{
		ch=temp[i];
		if(ch==' ')
		{
			num++;
			if(num==3)
			{
				cout<<"<dd>";
				num=0;
			}
			cout<<ch;
		}
		cout<<ch;
	}


	cout<<"</dl></blockqoute>";
	cout<<"<hr>";

	cout<<"Date : ";

	cout<<"<br>Place : ";
	cout<<"<h2 align=right>("<<name<<")</h2>";
	cout<<"</blockqoute>";
	cout<<"</html>";
	cout<<"End Of Your CV Press Any Key To Continue : ";
	getch();
	cout.clear();
	return 0;


}

