Specifications
CONSTRUCTION
cleardevice();
setbkcolor(LIGHTGREEN);
setcolor(RED);
moveto(150,200);
outtext(“Exiting to DOS..”);
delay(2000);
closegraph();
exit(1);
}
//Display the helpfile if resident or else indicate
error//
void displayhelp(char helpfilename[10])
{
fstream infile;
textbackground(BLACK);
window(1,1,80,25);
textcolor(LIGHTRED);
const int max=80;
char buffer[max];
clrscr();
infile.open(helpfilename,ios::in);
if(infile.fail())
{
window(10,8,70,9);
textcolor(YELLOW+BLINK);
clrscr;
cprintf(“.....HELP NOT AVALABLE OR ERROR
OPENING FILE.....\n\r ....Press any KEY TO
RETURN TO MAIN....”);
getch();
main();
}
while(!infile.eof())
{
infile.getline(buffer,max);
cout<<buffer;
cout<<endl;
}
infile.close();
getch();
main();
}
//Function to round off the float number to the
nearest integer//
int roundoff(float number)
{
int quotient;
float result;
quotient=int(number);
result=number-quotient;
if(result>0.5)
{
return(quotient+1);
}
else
{
return(quotient);
}
}
❏
29