SlideShare a Scribd company logo
1 of 15
Download to read offline
C++ PROGRAMING ASSIGNMENT
A WORK REPORT SUBMITTED
IN PARTIAL FULLFILLMENT OF THE REQUIREMENT FOR THE DEGREE
Bachelor of Computer Application
Dezyne E’cole College
106/10, CIVIL LINES
AJMER
RAJASTHAN - 305001 (INDIA)
(JULY, 2015)
www.dezyneecole.com
SUBMITTED BY:
KIRTESH KHANDELWAL
CLASS: BCA 2nd YEAR
1
PROJECT ABSTRACTION
I am KIRTESH KHANDELWAL Student of 2nd year doing my Bachelor Degree in Computer
Application.
In the following pages I gave compiled my work learnt during my 2nd year at college. The subject
is C++ Programming Language. We are taking an example of Restaurant, There are menu lists
is displayed by the restaurant manager. Whenever the customer will go there restaurant
he/she can choose one or more receipe’s / items from the menu lists is restaurant.
The Following code represent is based on menu driven programming concept that are based
on concept of menus that are perform and executed at run time. This code represent as a
converter to convert the number into the respective following bases. Menu driven
programming concept that represent the list at run time and asked for the respective following
input from the menu list by the user at run time and after it will take
Input and process to convert into the respective number conversion bases and generate the
desired output to the user.
1. Decimal to Binary
2. Binary to Decimal
3. Decimal to Octal
4. Decimal to Hexadecimal
5. Octal to Decimal
6. Hexadecimal to Decimal
The above conversion represent the menu list that are based on Menu Driven C++
Programming Concept.
2
In the following pages I am showcasing my work.
void main()
{
clrscr();
int d,w,i;
binary a;
a.deco();
gotoxy(27,6);
cout<<"CHOOSE ONE OF THE FOLLOWING";
gotoxy(27,8);
cout<<"1. for Decimal to Binary"<<endl;
gotoxy(27,9);
cout<<"2. for Binary to Decimal"<<endl;
gotoxy(27,10);
cout<<"3. for Decimal to Octal"<<endl;
gotoxy(27,11);
cout<<"4. for Decimal to Hexadecimal"<<endl;
gotoxy(27,12);
3
cout<<"5. for Octal to Decimal"<<endl;
gotoxy(27,13);
cout<<"6. for Hexadecimal to Decimal"<<endl;
gotoxy(27,14);
cin>>w;
if(w==1)
{
a.deco();
a.binary1();
a.binary2();
}
else if(w==2)
{
a.deco();
a.decimal1();
a.decimal2();
}
else if(w==3)
{
a.deco();
a.octal1();
a.octal2();
}
else if(w==4)
{
a.deco();
a.hexadecimal1();
a.hexadecimal2();
}
else if(w==5)
{
a.deco();
a.octaldeci1();
a.octaldeci2();
}
else if(w==6)
{
a.deco();
a.hexadeci1();
a.hexadeci2();
}
else
{
clrscr();
4
textcolor(RED + BLINK);
textbackground(WHITE);
gotoxy(30,12);
cprintf(" WRONG INPUT ");
delay(1000);
exit(0);
}
cout<<endl;
gotoxy(25,13);
cout<<"PRESS 1 FOR CONTINUE "<<endl;
gotoxy(25,14);
cin>>d;
if(d==1)
{
main();
}
else
{
exit(0);
}
cout<<endl;
getch();
}
class decorat
5
{
public:
void deco()
{
int i;
clrscr();
for(i=15;i<68;i+=2)
{
gotoxy(i,3);
cout<<"*";
}
for(i=15;i<68;i+=2)
{
gotoxy(i,18);
cout<<"*";
}
for(i=4;i<18;i++)
{
gotoxy(15,i);
cout<<"*n";
}
for(i=4;i<18;i++)
{
gotoxy(67,i);
cout<<"*n";
}
for(i=50;i<76;i+=2)
{
gotoxy(i,21);
cout<<"*";
}
for(i=22;i<25;i++)
{
gotoxy(50,i);
cout<<"*n";
}
for(i=22;i<25;i++)
{
gotoxy(74,i);
cout<<"*n";
}
for(i=52;i<76;i+=2)
6
{
gotoxy(i,24);
cout<<"*";
}
gotoxy(54,22);
cout<<"KIRTESH KHANDELWALn";
gotoxy(54,23);
cout<<"BCA PART 2n";
}
};
class binary: public decorat
{
public:
long n;
void binary1()
{
gotoxy(25,8);
cout<<"convert Decimal to Binary value";
gotoxy(25,9);
cout<<"Enter a Number:: ";
cin>>n;
}
void binary2()
{
long a[10];
long i=0,c=0,m=0,j;
while(n>0)
{
m=n%2;
a[i]=m;
c++,i++;
n=n/2;
}
c--;
gotoxy(25,11);
cout<<"BINARY VALUE IS ";
for(j=15;j>=0;j--)
{
if(j>c)
{
cout<<"";
}
else
7
{
cout<<a[j];
}
}
}
void decimal1()
{
gotoxy(25,8);
cout<<"convert BINARY to DECIMAL value";
gotoxy(25,9);
cout<<"Enter a Number:: ";
cin>>n;
}
void decimal2()
{
long a[16];
long i=0,m=0,l;
while(n>0)
{
m=n%10;
a[i]=m;
n=n/10;
i++;
8
}
l=i--;
int d=0;
for(i=0;i<l;i++)
{
if(i==0)
{
d=d+a[i]*1;
}
else
{
int z=2;
d=d+a[i]*pow(z,i);
}
}
gotoxy(25,11);
cout<<"DECIMAL VALUE IS "<<d;
}
void octal1()
{
gotoxy(25,8);
cout<<"convert DECIMAL to OCTALE value";
gotoxy(25,9);
9
cout<<"Enter a Number:: ";
cin>>n;
}
void octal2()
{
long a[10];
long i=0,c=0,m=0,j;
while(n>0)
{
m=n%8;
a[i]=m;
c++,i++;
n=n/8;
}
c--;
gotoxy(25,11);
cout<<"OCTALE VALUE IS ";
for(j=15;j>=0;j--)
{
if(j>c)
{
cout<<"";
}
else
{
cout<<a[j];
}
}
}
10
void hexadecimal1()
{
gotoxy(25,8);
cout<<"convert DECIMAL to HEXA-DECIMAL value";
gotoxy(25,9);
cout<<"Enter a Number:: ";
cin>>n;
}
void hexadecimal2()
{
int i,a[16];
char t;
i=0;
while(n>0)
{
a[i]=n%16;
i++;
n=n/16;
}
i--;
gotoxy(25,11);
cout<<"HEXA-DECIMAL VALUE IS ";
while(i>=0)
{
11
if(a[i]>=10 && a[i]<=15)
{
t=a[i]+55;
cout<<""<<t;
}
else
{
cout<<a[i];
}
i--;
}
}
void octaldeci1()
{
gotoxy(25,8);
cout<<"convert OCTALE to DECIMAL value";
gotoxy(25,9);
cout<<"Enter a Number:: ";
cin>>n;
}
void octaldeci2()
{
long a[16];
12
long i=0,m=0,l;
while(n>0)
{
m=n%10;
a[i]=m;
n=n/10;
i++;
}
l=i--;
int d;
d=0;
for(i=0;i<l;i++)
{
int z=8;
d=d+a[i]*pow(z,i);
}
gotoxy(25,11);
cout<<"DECIMAL VALUE IS "<<d;
}
void hexadeci1()
{
gotoxy(25,8);
cout<<"convert HEXA-DECIMAL to DECIMAL value";
gotoxy(25,9);
13
cout<<"Enter a Number:: ";
cin>>hex>>n;
}
void hexadeci2()
{
gotoxy(25,11);
cout<<"DECIMAL VALUE IS ";
cout<<n<<hex;
}
};
14
THANK YOU
SUBMITTED BY
KIRTESH KHANDELWAL
BACHELOR OF COMPUTER APPLICATION
CLASS: BCA 2nd
Year
Dezyne E’cole College
(2015-16)
www.dezyneecole.com

More Related Content

Similar to Kirtesh Khandelwal Number Convertor System

Labsheet 6 - FP 201
Labsheet 6 - FP 201Labsheet 6 - FP 201
Labsheet 6 - FP 201
rohassanie
 

Similar to Kirtesh Khandelwal Number Convertor System (20)

UoN-Lec_12_Control_Structure.pdf
UoN-Lec_12_Control_Structure.pdfUoN-Lec_12_Control_Structure.pdf
UoN-Lec_12_Control_Structure.pdf
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
I PUC CS Lab_programs
I PUC CS Lab_programsI PUC CS Lab_programs
I PUC CS Lab_programs
 
Portfolio2
Portfolio2Portfolio2
Portfolio2
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.com
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 
Bis 311 final examination answers
Bis 311 final examination answersBis 311 final examination answers
Bis 311 final examination answers
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menu
 
Devry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menuDevry cis-170-c-i lab-6-of-7-menu
Devry cis-170-c-i lab-6-of-7-menu
 
cbse 12 computer science investigatory project
cbse 12 computer science investigatory project  cbse 12 computer science investigatory project
cbse 12 computer science investigatory project
 
cbse 12 computer science investigatory project
cbse 12 computer science investigatory project  cbse 12 computer science investigatory project
cbse 12 computer science investigatory project
 
Labsheet 6 - FP 201
Labsheet 6 - FP 201Labsheet 6 - FP 201
Labsheet 6 - FP 201
 
cbse 12 computer science IP
cbse 12 computer science IPcbse 12 computer science IP
cbse 12 computer science IP
 
Cpph exam a_2019_s1
Cpph exam a_2019_s1Cpph exam a_2019_s1
Cpph exam a_2019_s1
 
CMIS 102 Entire Course NEW
CMIS 102 Entire Course NEWCMIS 102 Entire Course NEW
CMIS 102 Entire Course NEW
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 

Recently uploaded

Recently uploaded (20)

[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 

Kirtesh Khandelwal Number Convertor System