DR. RADHAKRISHANAN INTERNATIONAL
SCHOOL
PRACTICLE ON
C++ COMPUTER SCIENCE
Submitted by: Prabhat Kumar Chaudhary
Submitted to: Mrs Priyanka Khandelwal
Roll No.:
ACKNOWLEDGEMENT
In the accomplishment of this project successfully, many
people have best owned upon me their blessing and the
heart pledged support, this time I am utilizing to thank all
the people who have been concerned with project.
Primarily I would thank God for being able to complete
this project with success. Then I would like to thank my
chemistry teacher _________________________,whose
valuable guidance has been the ones that helped me patch
this project and made it successful. Then I would like to
thanks to my parents who have helped me with their
valuable suggestions and guidance has been helpful in
various phases of the completion of the project.
Lastly I would like to thanks to the internet which helped
me in giving the brief and detailed points for my project
and also thanks to the up-loader to upload the valuable
points.
Program on KAUN BANEGA
CARORPATI
#include<fstream.h>
#include<dos.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
#define tc(str) textcolor(str);
#define cp(str) cprintf(str);
#define tb(str) textbackground(str);
#define tcr(int) textcolor(int);
structcontestent
{
int a;
char n[20];
}s;
structqA
{
char q[80],ch1[20],ch2[20],ch3[20],ch4[20],a;
}s1;
char ch2=179;
voidfrontpage()
{
clrscr();
charch;
for(int i=5;i<75;i++)
{
gotoxy(i,5);
tc(BLUE) cp("_")
}
for(i=6;i<50;i++)
{
gotoxy(5,i);
tc(BLUE) cout<<ch2;
}
for(i=5;i<75;i++)
{
gotoxy(i,49);
tc(BLUE) cp("_")
}
for(i=6;i<50;i++)
{
gotoxy(75,i);
tc(BLUE) cout<<ch2;
}
gotoxy(25,10);
tc(YELLOW) cp("Dr. RadhaKrishan International
school") tb(BLACK);
gotoxy(20,12);
tc(WHITE) cp("WELCOME TO KAUN BANEGA
CROREPATI");
gotoxy(26,16);
tc(LIGHTBLUE) cp("DESIGNED BY: ");
tc(LIGHTGREEN); cp("PRABHAT KUMAR
CHAUDHARYn ");
gotoxy(28,18);
tc(YELLOW) cp("UNDER THE GUIDANCE OF: ")
tc(RED) cp("Mrs. RAKHIn");
gotoxy(20,20);
tc(YELLOW) cp("ENTER ANY CHARACTAR TO
EXIT")
getch();
}
void creation();
intupdation()
{
clrscr();inti;up: clrscr(); for(int i1=28;i1<=52;i1++)
{
gotoxy(i1,12);
tc(BLUE) cp("_");
}
for(i1=13;i1<28;i1++)
{
gotoxy(28,i1); tc(BLUE) cout<<ch2;
}
for(i1=28;i1<=52;i1++)
{
gotoxy(i1,27);
tc(BLUE) cp("_");
}
for(i1=13;i1<28;i1++)
{
gotoxy(52,i1);
tc(BLUE) cout<<ch2;
}
gotoxy(35,14);
tcr(12) cp("MAIN MENU:");
gotoxy(33,16);
tcr(14) cp("1.ADD QUESTION:");gotoxy(33,18);
tc(BLUE) cp("2.DELETE QUESTION:");gotoxy(33,20);
tcr(18) cp("3.HISTORY:");gotoxy(33,22);
tcr(20) cp("4.UPDATION:"); gotoxy(33,24);
tcr(22) cp("5.EXIT:");
gotoxy(33,26);cout<<"ENTER YOUR CHOICE:";
cin>>i;
switch(i)
{
case 1: creation();
goto up;
case 4: char ch;
int n;
fstream file;
file.open("QuestionAnswer.dat",ios::in|ios::out|ios::binar
y);
do
{
file.read((char *)&s1,sizeof(s1));
cout<<"nENTER QUESTION NUMBER
TO BE UPDATED";
cin>>n;
cout<<"nENTER QUESTION:";
gets(s1.q);
cout<<"nENTER FIRST choice (A)':";
gets(s1.ch1);
cout<<"nENTER SECOND CHOICE
(B):";
gets(s1.ch2);
cout<<"nENTER THIRD CHOICE (C):";
gets(s1.ch3);
cout<<"nENTER FOURTH CHOICE
(D):";
gets(s1.ch4);
cout<<"nENTER ANSWER (A/B/C/D):";
cin>>s1.a;
file.seekg((n-1)*sizeof(s1));
file.write((char *)&s1,sizeof(s1));
cout<<"nENTER'Y' TO UPDATE
MORE QUESTIONS";
cin>>ch;
}while((ch=='Y')||(ch=='y'));
file.close();
break;
case 5:clrscr();
gotoxy(35,15);
/* switch(ch1)
{
case 'n':
case 'N':
case 2: goto up;
case 'y':
case 'Y':
case 1: clrscr(); gotoxy(34,20);
tcr(19) cp("THANKYOU");
break;
} */
tc(RED) cp("ARE YOU SURE TO WANT TO
EXIT");
tc(GREEN) cp("THANK YOU");
break;
}
return i;
}
void creation()
{
clrscr();
charch;
int i=0;
fstream f;
f.open("QuestionAnswer.dat",ios::in|ios::app|ios::bi
nary);
do
{
//f.read((char*)&s1,sizeof(s1));
//f.seekg(0,ios::end);
cout<<"nENTER QUESTION:";
gets(s1.q);
cout<<"nENTER FIRST CHOICE (A):";
gets(s1.ch1);
cout<<"nENTER SECOND CHOICE (B):";
gets(s1.ch2);
cout<<"nENTER THIRD CHOICE (C):";
gets(s1.ch3);
cout<<"nENTER FOURTH CHOICE (D):";
gets(s1.ch4);
cout<<"nENTER ANSWER (A/B/C/D):";
cin>>s1.a;
f.write((char*)&s1,sizeof(s1));
cp("ENTER 'Y' TO ADD MORE
QUESTION");
cin>>ch;
}while(ch=='Y');
f.close();
cout<<i<<endl;
}
int accessing(int i)
{
int k;
fstream f1;
char a;
f1.open("QuestionAnswer.dat",ios::in|ios::binary);
while(f1)
{
f1.seekp(i);
f1.read((char*)&s1,sizeof(s1));
gotoxy(24,12);cout<<"Question1:"<<s1.q;
gotoxy(21,13);cout<<"Choice'A':"<<s1.ch1;
gotoxy(21,14);cout<<"Choice'B':"<<s1.ch2;
gotoxy(37,13);cout<<"Choice'C':"<<s1.ch3;
gotoxy(37,14);cout<<"Choice'D':"<<s1.ch4;
gotoxy(21,15);cout<<"nENTER YOUR
ANSWER(A/B/C/D):";
cin>>a;
if(a==s1.a)
{
cout<<"nCORRECT ANSWER";
k=0;
break;
}
else
{
cout<<"nWRONGCHOICE";
k=0;
break;
}
}
f1.close();
return k;
}
void play_new()
{
inti,l=0;
up: clrscr();
gotoxy(8,5);
cout<<"1.Rs.5000";
gotoxy(8,8);
cout<<"2.Rs.10000";
gotoxy(8,11);
cout<<"3.Rs.20000";
gotoxy(8,14);
cout<<"4.Rs.40000";
gotoxy(8,17);
cout<<"5.Rs.80000";
gotoxy(8,20);
cout<<"6.Rs.1,60,000";
gotoxy(8,23);
cout<<"7.Rs.3,20,000";
gotoxy(8,26);
cout<<"8.Rs.6,40,000";
gotoxy(8,29);
cout<<"9.Rs.12,50,000";
gotoxy(8,32);
cout<<"10.Rs.25,00,000";
gotoxy(8,35);
cout<<"11.Rs.50,00,000";
gotoxy(8,38);
cout<<"12.Rs.1,00,00,000";
gotoxy(8,41);
cout<<"13.Rs.5,00,00,000";
i=accessing(l);
if(i==0)
{
l=l+sizeof(s1);
goto up;
}
}
void play();
void main()
{
sound(5900);frontpage();
clrscr();
int i;
up: clrscr(); for(int i1=28;i1<=52;i1++)
{
gotoxy(i1,12);
tc(BLUE) cp("_");
}
for(i1=13;i1<28;i1++)
{
gotoxy(28,i1); tc(BLUE) cp("|");
}
for(i1=28;i1<=52;i1++)
{
gotoxy(i1,27);
tc(BLUE) cp("_");
}
for(i1=13;i1<28;i1++)
{
gotoxy(52,i1);
tc(BLUE) cp("|");
}
gotoxy(35,14);
tcr(14) cp("MAIN MENU:");
gotoxy(33,16);
tcr(11) cp("1.ABOUT KBC:");
gotoxy(33,18);
tcr(13) cp("2.PLAY:");
gotoxy(33,20);
tc(GREEN) cp("3.HISTORY:");
gotoxy(33,22);
tc(BLUE) cp("4.UPDATION:");
gotoxy(33,24);
tc(RED) cp("5.EXIT:");
gotoxy(33,26);
cout<<"ENTER YOUR CHOICE";
cin>>i;
if(i==2)
{
play_new();
}
else if(i==4)
{
I nt j=updation();
clrscr();
if(j==5)
goto up;
}
else if(i==5)
{
int ch1; clrscr();
gotoxy(28,18);
tcr(18) cp("ARE YOU SURE TO WANT TO
EXIT?");
gotoxy(30,20);
tcr(20) cp("1.YES");
gotoxy(45,20);
tcr(20) cp("2.NO");
gotoxy(30,22);
tcr(21) cp("ENTER YOUR CHOICE:");
cin>>ch1;
switch(ch1)
{
case 'n':
case 'N':
case 2: goto up;
case 'y':
case 'Y':
case 1: clrscr(); gotoxy(34,20); tcr(19)
cp("THANK YOU");
break;
}
}
nosound();
getch();
}
void play()
{
int n=1,x,y,tq; fstream f; char choice;
f.open("QuestionAnswer.dat",ios::binary|ios::in);
f.read((char*)&s1,sizeof(s1));
/*f.seekg(0,ios::end);
tq=f.tellg()/sizeof(s1);
if(tq<10) { cout<<tq<<" questions are found. Add
"<<10-tq<<" questions more to play"; getch(); goto
en;
f.seekg(sizeof(s1),ios::beg);*/
while(f){x=20; y=1;
gotoxy(x,y++); cout<<"Question : "<<n++<<" ";
puts(s1.q);
gotoxy(x,y++); cout<<"Option 1 : "; puts(s1.ch1);
gotoxy(x,y++); cout<<"Option 2 : "; puts(s1.ch2);
gotoxy(x,y++); cout<<"Option 3 : "; puts(s1.ch3);
gotoxy(x,y++); cout<<"Option 4 : "; puts(s1.ch4);
tp: gotoxy(x,y++); cout<<"Your Option : ";
cin>>choice;
switch(choice)
{
case '1': case 'a':
case 'A': choice='A'; break;
case '2': case 'b':
case 'B': choice='B'; break;
case '3': case 'c':
case 'C': choice='C'; break;
case '4': case 'd':
case 'D': choice='D'; break;
default : y--;
gototp;
}
cout<<choice; gotoxy(x,y++);
if(choice==s1.a) cout<<"Correct Option";
elsecout<<"Wrong Option"; getch();
f.read((char*)&s1,sizeof(s1));
} en:
f.close();
}
OUTPUT
KBC c++ program
KBC c++ program
KBC c++ program
KBC c++ program
KBC c++ program
KBC c++ program
KBC c++ program
KBC c++ program

More Related Content

DOCX
GPA calculator and grading program in c++
PDF
Deepika Mittal , BCA Third Year
DOCX
computer shop
PPTX
Computerscience 12th
PDF
Online exam
PDF
Computer Project for class 12 CBSE on school management
PDF
Reshma Kodwani , BCA Third Year
PDF
computer science project class 12th
GPA calculator and grading program in c++
Deepika Mittal , BCA Third Year
computer shop
Computerscience 12th
Online exam
Computer Project for class 12 CBSE on school management
Reshma Kodwani , BCA Third Year
computer science project class 12th

Similar to KBC c++ program (20)

PDF
Rakesh Bijawat , BCA Third Year
PPTX
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptx
PDF
Kirti Kumawat, BCA Third Year
DOCX
CCE management system
DOCX
C.S. project report on railway ticket reservation
PDF
lab.123456789123456789123456789123456789
 
PDF
Complete Lab 123456789123456789123456789
PDF
Lab program 1234567891234567891234567891
PDF
Zoro123456789123456789123456789123456789
 
PDF
labb123456789123456789123456789123456789
 
PPTX
Password management
DOCX
Computer science project
DOCX
Report Card making BY Mitul Patel
PDF
Ronak Kachhawa , BCA Third Year
PDF
Gaurav Jatav , BCA Third Year
DOC
project report in C++ programming and SQL
DOCX
computer science project
PPTX
Make BDD great again
DOC
Student record
PDF
Shivani Chouhan , BCA Third Year
Rakesh Bijawat , BCA Third Year
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptx
Kirti Kumawat, BCA Third Year
CCE management system
C.S. project report on railway ticket reservation
lab.123456789123456789123456789123456789
 
Complete Lab 123456789123456789123456789
Lab program 1234567891234567891234567891
Zoro123456789123456789123456789123456789
 
labb123456789123456789123456789123456789
 
Password management
Computer science project
Report Card making BY Mitul Patel
Ronak Kachhawa , BCA Third Year
Gaurav Jatav , BCA Third Year
project report in C++ programming and SQL
computer science project
Make BDD great again
Student record
Shivani Chouhan , BCA Third Year
Ad

Recently uploaded (20)

PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
International_Financial_Reporting_Standa.pdf
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
My India Quiz Book_20210205121199924.pdf
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
HVAC Specification 2024 according to central public works department
PDF
Trump Administration's workforce development strategy
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
International_Financial_Reporting_Standa.pdf
Paper A Mock Exam 9_ Attempt review.pdf.
Cambridge-Practice-Tests-for-IELTS-12.docx
What if we spent less time fighting change, and more time building what’s rig...
My India Quiz Book_20210205121199924.pdf
Practical Manual AGRO-233 Principles and Practices of Natural Farming
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
HVAC Specification 2024 according to central public works department
Trump Administration's workforce development strategy
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
AI-driven educational solutions for real-life interventions in the Philippine...
FORM 1 BIOLOGY MIND MAPS and their schemes
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Ad

KBC c++ program