www.pudn.com > f_graph_h.zip > main.cpp


//FIRAT KARAKUSOGLU    
//firatkarakusoglu@hotmail.com      
//SIMPLE CALCULATIONS FOR USING "f_graph.h" HEADER FILE 
 
#include  
#include    
#include "f_graph.h" //basic graphic and some additional functions 
 
#define s2 "                    " //20 pix     
 
using namespace std; 
  
int menu(void)    
{  
     gf.makeSkeleton(); 
     gf.headerLine("Basic Calculations"); 
     gf.setTitle(s2"Sample Project For \"f_graph.h\" Header File - by FIRAT KARAKUSOGLU");  
     gf.showLeftSide("   MENU   ",1); 
     gf.showLeftSide(""); 
     gf.showLeftSide("1 Summation");  
     gf.showLeftSide("2 Substraction"); 
     gf.showLeftSide("3 Multiplication"); 
     gf.showLeftSide("4 Division"); 
     gf.showLeftSide("5 Exit"); 
     gf.footerLine("Enter your choice [1-5]: "); 
     int intUserChoice = 0; 
     cin>>intUserChoice; 
     while(intUserChoice<1 || intUserChoice>5) 
     {  
                           intUserChoice = 0; 
                           gf.warning("Error: Your choice should be [1-5]!"); 
                           gf.footerLine("Enter your choice [1-5]: "); 
                           cin>>intUserChoice; 
                           }; 
     return intUserChoice; 
     }; 
       
void menu1(void) 
{  
     double x=0; 
     double y=0; 
     double sum=0; 
      
     gf.showRightSide("        SUMMATION",1); 
     gf.showRightSide("-----------------------------------------"); 
      
     gf.footerLine("Enter augend : "); cin>>x; 
     gf.showRightSide("Augend is: "); cout<>y; 
     gf.showRightSide("Addend is: "); cout<>x; 
     gf.showRightSide("Minuend is: "); cout<>y; 
     gf.showRightSide("Subtrahend is: "); cout<>x; 
     gf.showRightSide("Multiplicand is: "); cout<>y; 
     gf.showRightSide("Multiplier is: "); cout<>x; 
     gf.showRightSide("Dividend is: "); cout<>y; 
     gf.showRightSide("Divider is : "); cout<