Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sanjayengineer121/ac5b552dd1c285ae91cb647bfb87450c to your computer and use it in GitHub Desktop.
Save sanjayengineer121/ac5b552dd1c285ae91cb647bfb87450c to your computer and use it in GitHub Desktop.
Billing services
#include <iostream>
#include<conio.h>
#include<string.h>
#include<fstream>
#include<ctime>
using namespace std;
void object()
{
cout<<"\n******************************************************";
cout<<"\n======================================================";
cout<<"\n || *SEE ALL THE OBJECT LIST* || ";
cout<<"\n======================================================";
cout<<"\n******************************************************";
cout<< "\n1-MANGO\n2-BOOKS\n3-PENS\n4-ONIONS\n5-SAMPOO\n6-SOAP\nBISCUIT\n7-SURF\DETURGEMNT\n8-JEANS";
cout<<"\n9-t-SHIRTS\n10-SHIRTS\n11-DEODRANT\n12-PERFUME\n13-COOCKER\n14-BAGS\n15-ALMONDS\DRY_FOODS";
cout<<"\n16-HEAD PHONE\n17-SPEAKER\n18-BLUTOOTH\n19-COCONUT\n20-EGGS\n21-BOTTOL\n22-BREAD\n23-COFIEE";
cout<<"\n24-FRUITS\n25-PEENUTS\n36-HANGER\n37-SHOES\n38-BOTTEL\n39-COLLERWATER\n40-CREANS\BEAUTY CREAMS";
time_t currentTime;
struct tm *localTime;
time( &currentTime );
localTime = localtime( &currentTime );
int Day = localTime->tm_mday;
int Month = localTime->tm_mon + 1;
int Year = localTime->tm_year + 1900;
int Hour = localTime->tm_hour;
int Min = localTime->tm_min;
int Sec = localTime->tm_sec;
cout<<"\n======================================================================================================";
std::cout << " \n TIME IS::= " << Hour << ":" << Min << ":" << Sec << std::endl;
std::cout << " \n DATE IS:: =" << Day << "/" << Month << "/" << Year << std::endl;
cout<<"\n====================================================================================================";
}
void price()
{ cout<<"\n*************************************************************************************************";
cout<<"\n @@|SEE THE PRICE LIST|@@ ";
cout<<"\n****************************************************************************************************";
cout<<"\n1-MANGO is=50/kg\n2-BOOKS is 30 or 40 or 50 or 60....\n3-PENS is-5/10/15/20/25/30/40/50/100/200\n4-ONIONS is=60/kg\n5-SAMPOO is 35/55\n6-SOAP\nBISCUIT-5/10/20/30/50\n7-SURF\DETURGEMNT is=10/20/50/200/100\n8-JEANS are given by brand";
cout<<"\n9-t-SHIRTS by 300 or 400 or 500\n10-SHIRTS are=300/400/500..\n11-DEODRANT is 200/300/500\n12-PERFUME is 100/200/400\n13-COOCKER is 1000/2000\n14-BAGS is 400/600\n15-ALMONDS-800/kg or 950/kg\DRY_FOODS. are...by name....";
cout<<"\n16-HEAD PHONE is 400/500/1000/2000\n17-SPEAKER is=1000/1500\n18-BLUTOOTH is=1000/1500/3000/5000\n19-COCONUT is =10/20\n20-EGGS is 24 in 100rs\n21-BOTTOL is=80/200/300\n22-BREAD is=60/80\n23-COFIEE is in 30 or 40 or 60";
cout<<"\n24-FRUITS are in 30/40/60/100...\n25-PEENUTS is= 40/kg\n36-HANGER is 20/30\n37-SHOES are by brand\n38-BOTTEL is =300\n39-COLLERWATER is 4000\n40-CREANS\BEAUTY CREAMS..are many";
time_t currentTime;
struct tm *localTime;
time( &currentTime );
localTime = localtime( &currentTime );
int Day = localTime->tm_mday;
int Month = localTime->tm_mon + 1;
int Year = localTime->tm_year + 1900;
int Hour = localTime->tm_hour;
int Min = localTime->tm_min;
int Sec = localTime->tm_sec;
cout<<"\n======================================================================================================";
std::cout << " \n TIME IS::= " << Hour << ":" << Min << ":" << Sec << std::endl;
std::cout << " \n DATE IS:: =" << Day << "/" << Month << "/" << Year << std::endl;
cout<<"\n====================================================================================================";
}
void employ()
{
cout<<"\n**********************==============================================***************************";
cout<<"\n | OUR EMPLOY DETAILS AND ADDRESS ANA CONT_NO.| ";
cout<<"\n**********************==============================================****************************";
cout<<"\n 1-priya sherma";
cout<<"\n 2-mangeeta phogat";
cout<<"\n 3-saurabh jain";
cout<<"\n 4-sanjay yadav";
cout<<"\n 6-sandeep pawar";
cout<<"\n 7-and many more......";
time_t currentTime;
struct tm *localTime;
time( &currentTime );
localTime = localtime( &currentTime );
int Day = localTime->tm_mday;
int Month = localTime->tm_mon + 1;
int Year = localTime->tm_year + 1900;
int Hour = localTime->tm_hour;
int Min = localTime->tm_min;
int Sec = localTime->tm_sec;
cout<<"\n======================================================================================================";
std::cout << " \n TIME IS::= " << Hour << ":" << Min << ":" << Sec << std::endl;
std::cout << " \n DATE IS:: =" << Day << "/" << Month << "/" << Year << std::endl;
cout<<"\n====================================================================================================";
}
int main()
{
cout<<"created by::sanjay yadav\t\t\t\t\t\t\t\t\t\submitted to::";
cout<<"\nK1632-B-37\t\t\t\t\t\t\t\t\t\t\t\t SAPNA MAM ";
cout<< "\n ***************************** ********************************* ***************** " ;
cout<<"\n ****(@@@@@@@)************ !!!WELCOME TO SUPER MARKET!!!*** (@@@@@@@@)********";
cout<<"\n *********************** *************************************** ********************";
char object_names[100];
int number_of_object;
int obj_code;
int price_of_obj;
int total_price = 0.0;
float discount;
int i;
float final_price;
float tax;
float other_tax;
char names[10];
long int mobile_no;
float discount_rate;
int input;
int n;
cout<<"\n 1-KNOW OBJECT LIST....\n";
cout<<"\n 2-KNOW THE PRICE OF OBJECT.....\n";
cout<<"\n 3-KNOW ABOUT EMPOYEE...\n";
cout<<"\n 4-MAKE A BILL\n";
cout<<"\nSelection: ";
time_t currentTime;
struct tm *localTime;
time( &currentTime );
localTime = localtime( &currentTime );
int Day = localTime->tm_mday;
int Month = localTime->tm_mon + 1;
int Year = localTime->tm_year + 1900;
int Hour = localTime->tm_hour;
int Min = localTime->tm_min;
int Sec = localTime->tm_sec;
cout<<"\n======================================================================================================";
std::cout << " \n TIME IS::= " << Hour << ":" << Min << ":" << Sec << std::endl;
std::cout << " \n DATE IS:: =" << Day << "/" << Month << "/" << Year << std::endl;
cout<<"\n====================================================================================================";
cin>>input;
switch(input)
{
case 1:
object();
cout<<"\n=================================================================================";
cout<<"\n || @@ENTER KNOW NORE ABOUT PRODUCT@@ || ";
cout<<"\n=================================================================================";
break;
case 2:
price();
break;
case 3:
employ();
cout<<"\n**********************==============================================***************************";
cout<<"\n | ENTER YOUR CHOICE....| ";
cout<<"\n**********************==============================================****************************";
cin>>n;
system("PAUSE");
if(n==1)
{
cout<<"\n**********************==============================================***************************";
cout<<"\n MRS.PRIYA SHERMA IS ON 1ST NO. COUNTER FOR MAKE BILL\n ADDRESS-PHAGWAR,CENTRAL TOWN\nCONTACT_NO-9794227876";
cout<<"\n**********************==============================================***************************";
}
if(n==2)
{
cout<<"\n**********************==============================================***************************";
cout<<"\n MRS.MANGEETA PHOGAT IS ON 2ND NO.COUNTER FOR MAKE BILL\n ADDRESS-ALLAHABAD U,P\n CONTACT_NO-7800602070";
cout<<"\n**********************==============================================***************************";
}
if(n==3)
{
cout<<"\n**********************==============================================***************************";
cout<<"\n MR.saurabh jain ON 3RD NO. COUNTER\nADDRESS-ALLAHABAD,U.P,INDIA\n CONTACT_NO-7071724327";
cout<<"\n**********************==============================================***************************";
}
if(n==4)
{
cout<<"\n**********************==============================================***************************";
cout<<"\n **MR.SANJAY YADAV IS MANAGER OF THIS SUPER MARKET**\n ADDRESS-JAUNPUR,UTTER-PRADESH\n PH_NO-8127011210\n0112-2244757";
cout<<"\n**********************==============================================***************************";
}
}
cout<<"\nEnter which thing";
system("color d");
cout<<"\n ENTER OBJECT NAME=====";
cin>>object_names;
cout<<"\n>>>>object>>code_or_bar_code>>";
cin>>obj_code;
cout<<"\n>>>NUMBER OF OBJECT>>>";
cin>>number_of_object;
cout<<"\n>>>>>>>>>PRICE OF OBJECT>>>>>>>>>";
cin>>price_of_obj;
total_price=price_of_obj*number_of_object;
cout<<"\n total_price = "<<total_price;
cout<<"\n ~~~~~~~~~ENTER IF ANY DISCOUNT~~~~~~~~~~~~";
cin>>discount_rate;
discount=(total_price*discount_rate)/100;
cout<<"\n ===============================================";
cout<<"\n || total discount="<<discount <<"||";
cout<<"\n **********************************************";
tax=(total_price*2.51)/100;
other_tax=(total_price*1.96)/100;
cout<<"\n \2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2";
cout<<"\n total tax="<<tax;
cout<<"\n \2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2";
cout<<"\n ===================================================================";
cout<<"\n | total other tax="<<other_tax <<"|";
cout<<"\n ====================================================================";
final_price=((total_price+tax+other_tax)-discount);
cout<<"\n\n \2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2 ";
cout<<"\n final_price="<<final_price;
cout<<"\n \2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2";
cout<<"\n|==========================================================================================================================================|";
cout<<"\n|DETAILS>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>:::";
cout<<"\n|object_names:\t\tobject>>code\t\tNUMBER OF OBJECT\t\tPRICE OF OBJECT\t\ttotal_price\t\tFINAL PRICE\n";
cout<<object_names<<"\t\t\t"<<obj_code<<"\t\t\t\t"<<number_of_object<<"\t\t\t\t"<<price_of_obj<<"\t\t"<<total_price<<"\t\t\t"<<final_price<< "|";
cout<<"\n|==========================================================================================================================================|";
ofstream myfile;
myfile.open("example.txt");
myfile<<"\n|==========================================================================================================================================|";
myfile<<"\n|DETAILS>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>:::";
myfile<<"\n|object_names:\t\tobject>>code\t\tNUMBER OF OBJECT\t\tPRICE OF OBJECT\t\ttotal_price\t\tFINAL PRICE\n";
myfile<<object_names<<"\t\t\t"<<obj_code<<"\t\t\t\t"<<number_of_object<<"\t\t\t\t"<<price_of_obj<<"\t\t"<<total_price<<"\t\t\t"<<final_price<< "|";
myfile<<"\n|==========================================================================================================================================|";
cout<<"\n ****************************************************************************************************";
cout<<"\n || THANKS FOR CHOOSING US || ";
cout<<"\n *****************************************************************************************************";
cout<<"\n ==================================================================================";
cout<<" \n | ENTER YOUR NAME AND | ";
cout<<"\n | CONTACT NO |";
cout<<"\n ==================================================================================";
cin>>names;
cout<<"\n your name="<<names;
cin>>mobile_no;
cout<<"\n your mobile_no="<<mobile_no;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment