#include<iostream>
#include<string.h>
#include<windows.h>
#include<ctime>
using namespace std;
int main()
{
string responce1,responce2 ,responce3,responce4,response5;
int c,h;
c = (rand() + time(0))% 100;
h=c/2;
system("color f4");
cout<<"\n\n\n\n\n\n\n\n\t\t\t\t*************game****************"<<endl;
system("pause");
system("cls");
system("color f1");
cout<<"\n\n\n\n\n\n\n\n\t\t\t\tthink a number in your mind"<<endl;
Sleep(1000);
cout<<"\n\t\t\t\thave you think,enter yes"<<endl;
cin>> responce1;
system("pause");
system("cls");
system("color f9");
if(responce1=="yes"||responce1=="Yes"||responce1=="YES"||responce1=="y")
{
cout<<"\n\n\n\n\n\n\n\n\t\t\t\tadd same amount for your friend "<<endl;
Sleep(1000);
cout<<"\n\t\t\t\thave you added,enter yes"<<endl;
cin>> responce2;
system("pause");
system("cls");
system("color f5");
if(responce2=="yes"||responce2=="Yes"||responce2=="YES"||responce2=="y")
{
cout<<" \n\n\n\n\n\n\n\n\t\t\t\tadd my "<< c << "ruppes also"<<endl;
Sleep(1000);
cout<<"\n\t\t\t\thave you added,enter yes"<<endl;
cin>> responce3;
system("pause");
system("cls");
system("color f2");
if(responce3=="yes"||responce3=="Yes"||responce3=="YES"||responce3=="y")
{
cout<<"\n\n\n\n\n\n\n\n\t\t\t\tgive half of the amount to a begger"<<endl;
Sleep(1000);
cout<<"\n\t\t\t\thave you give it to begger,enter yes"<<endl;
cin>> responce4;
system("pause");
system("cls");
system("color f6");
if(responce4=="yes"||responce4=="Yes"||responce4=="YES"||responce4=="y")
{
cout<<"\n\n\n\n\n\n\n\n\t\t\t\ttake your amount off.means(take your amount out which you thought earliar."<<endl;
Sleep(1000);
cout<<"\n\t\t\t\thave you get your amount out,enter yes"<<endl;
cin>>response5;
system("pause");
system("cls");
system("color f8");
if(response5=="yes"||response5=="Yes"||response5=="YES"||response5=="y")
{
cout<<"\n\n\n\n\n\n\n\n\t\t\t\tremaining amount is "<< h<< " rupees"<<endl;
}
}
}
}
}
else
cout<<"\n\n\n\n\n\n\n\n\t\t\t\tenter valid input as stated."<<endl;
return 0;
}
Contents covered: queues,Stacks,Arrays,Strings,Trees little concepts of loops and conditional statements. All of this is data structure also known as OOP. classes and structure also used in programms randomly. c++ all concepts will reaptidly shown here
Sunday, April 14, 2019
welcome back after a long time
visite my youtube channel . link is given below
seekersforseekers-youtube channel
facebook page :-
i am programmer codeseekers
Sunday, February 10, 2019
insert image in graphics c++
Tuesday, January 22, 2019
bubbles using graphics
![]() |
bubbles in using graphics |
#include<graphics.h>
#include<conio.h>
int main()
{
int gmode=DETECT ,gm;
initgraph(&gmode,&gm,"c://tc//bgi");
cleardevice();
int i,j,k=5;
while(1)
{
for(i= 200,j=1;i>1,j<=200;i--,j++)
{
setcolor(10);
//circle(10,20+j,30+j);
circle(100+i,100,30); // left to right
setcolor(8);
circle(100+i,200,30); // left to right
setcolor(5);
circle(100,200+i,30); // below to upper right corner
setcolor(5);
circle(100+i,200+i,30); // below to upper left corner
setcolor(6);
circle(100+i,100+i,30);
setcolor(3);
circle(10+i,0+i,30);
setcolor(4);
circle(100,100+i,30);
setcolor(1);
circle(100,100+j,30);
setcolor(2);
circle(100+j,100,30);
setcolor(2);
circle(10+j,10+j,30);
setcolor(11);
circle(100+j,200+j,30);
setcolor(12);
circle(100+j,0+j,30);
setcolor(13);
circle(100+i,100+j,30);
setcolor(14);
circle(100+i,200+j,30);
setcolor(15);
circle(0+j,100+j,30);
//line(100+j,100+j,200+j,300+j);
delay(30);
cleardevice();
}
}
getch();
}
Friday, January 18, 2019
graphics basic program to print star
graphics-star |
#include<graphics.h>
#include<conio.h>
int main()
{
int gmode= DETECT ,gm;
initgraph(&gmode,&gm,"c://tc//bgi");
int i;
while(1)
{
for(i=1;i<15;i++)
{
cleardevice();
setcolor(i);
line(100,100,160,270);
line(160,270,230,100);
line(80,210,240,210);
line(100,100,240,210);
line(80,210,230,100);
delay(500);
}
}
getch();
closegraph();
}
Subscribe to:
Posts (Atom)