/* Convert pascal assignment to C assignment
   Hint: Pascal Assignment-> a:=b
	 C assignment     -> a=b;
   using getchar() function to read input
*/
#include<stdio.h>
main()
{
	int i,j;
	char a[150],b[150];
	clrscr();
	printf("enter the input\n");
	for(i=0;(a[i]=getchar())!='$';i++);
	a[i]='\0';
	for(i=0,j=0;a[i]!='\0';j++,i++)
	{
		/*  if(a[i]==':')
		     i++;
		  else
		  { */
			if (a[i]=='\n')
			{
			b[j]=';';
			j++;
			b[j]=a[i];
			}
			else
				b[j]=a[i];
		 // }
	}
	b[j]='\0';
	for (j=0;b[j]!='\0';j++)
	{
		printf("%c",b[j]);
	}
	getch();
}

/* Exercise: 1. Read Char from KB until # and copy the last n char */