Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d724845
Changes made
Zitihskx Oct 20, 2021
09466e6
Lit change
Zitihskx Oct 20, 2021
e2720ff
Naya changes
Zitihskx Oct 20, 2021
8914e01
added java program
sahooankeeta Oct 20, 2021
9d25859
Merge pull request #362 from sahooankeeta/sahooankeeta
swaaz Oct 21, 2021
4815d92
Merge pull request #360 from Aryal-rajiv/master
swaaz Oct 21, 2021
254ea92
lelefolkl
lelefolkl Oct 22, 2021
d7bbb37
Add files via upload
ShreyasManchanda Oct 22, 2021
943ba09
Create wda
ShreyasManchanda Oct 22, 2021
79ba1f3
Create Find_area _of_triangle.py
ShreyasManchanda Oct 22, 2021
a5fca1c
Delete Find_area _of_triangle.py
ShreyasManchanda Oct 22, 2021
b7c0a91
Update README.md
ShreyasManchanda Oct 22, 2021
cb09a4e
Delete wda
ShreyasManchanda Oct 22, 2021
4ae7927
Create Find_area _of_triangle.py
ShreyasManchanda Oct 22, 2021
0051140
Update README.md
ShreyasManchanda Oct 22, 2021
87d417c
add
Oct 22, 2021
b2f668c
Create bmcsnakegame.c
Binaya-mrt Oct 22, 2021
a42dfbc
folder created
Binaya-mrt Oct 22, 2021
2b505f7
Create program.c
themarkib0x01 Oct 24, 2021
763fb09
Create README.md
themarkib0x01 Oct 24, 2021
d513b11
Create program.c
themarkib0x01 Oct 24, 2021
8d5129d
Merge pull request #364 from lelefolkl/lelefolkl
swaaz Oct 25, 2021
bb2116f
C++ program to find wifi password
samiparyal Oct 25, 2021
ebcf179
Maths Calculator (Request Auto Detect)
samiparyal Oct 25, 2021
cd50553
hectoberfest
Utshab98 Oct 26, 2021
b892a98
Merge pull request #365 from swaaz/hacktoberfest
swaaz Oct 28, 2021
0023bb2
Merge pull request #366 from Sk1llful/master
swaaz Oct 28, 2021
a9ca98c
Merge pull request #367 from A-K-2001/master
swaaz Oct 28, 2021
96496a9
Merge pull request #368 from Binaya-mrt/master
swaaz Oct 28, 2021
de560f2
Merge pull request #369 from themarkib0x01/patch-1
swaaz Oct 28, 2021
f440897
Merge pull request #370 from themarkib0x01/patch-2
swaaz Oct 28, 2021
c55f4b1
Merge pull request #371 from samiparyal/master
swaaz Oct 28, 2021
4af57d3
Merge pull request #372 from Utshab98/master
swaaz Oct 28, 2021
b4266ff
#hactoberfest
Utshab98 Oct 29, 2021
7493608
Merge branch 'swaaz:master' into master
Utshab98 Oct 29, 2021
3ccd8f3
Merge pull request #374 from Utshab98/master
swaaz Oct 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions C++/Program-30/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to convert number in characters.
57 changes: 57 additions & 0 deletions C++/Program-30/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//Program to convert number in characters
#include <iostream>
using namespace std;
int main()
{
long int n,sum=0,r;
cout<<"Enter the Number= ";
cin>>n;
while(n>0)
{
r=n%10;
sum=sum*10+r;
n=n/10;
}
n=sum;
while(n>0)
{
r=n%10;
switch(r)
{
case 1:
cout<<"one ";
break;
case 2:
cout<<"two ";
break;
case 3:
cout<<"three ";
break;
case 4:
cout<<"four ";
break;
case 5:
cout<<"five ";
break;
case 6:
cout<<"six ";
break;
case 7:
cout<<"seven ";
break;
case 8:
cout<<"eight ";
break;
case 9:
cout<<"nine ";
break;
case 0:
cout<<"zero ";
break;
default:
cout<<"tttt ";
break;
}
n=n/10;
}
}
17 changes: 17 additions & 0 deletions C++/See wifi pass.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <cstdlib>
#include <iostream>
using namespace std;
string x;
int y;
int main()
{
system("color e");
cout<< ("\nsamz>\t");
system("netsh wlan show profile");
cout << ("WHICH ONE?--");
string z = "netsh wlan show profile\t \"";
string n = "\"\tkey=clear";
cin >> x;
z = z + x + n;
system(z.c_str());
}
50 changes: 50 additions & 0 deletions C++/program_30/operator_overloading.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

/*
cpp program for operator overloading
Author: Anil Kumar
Date modified:21-10-2021
*/


#include<iostream>
using namespace std;

class complex
{
private:
float a,b;
public:

void set(float x, float y){
a=x;
b=y;
}
complex operator+(complex c){
complex t;
t.a=a+c.a;
t.b=b+c.b;
return t;
}
complex operator-(){
complex t;
t.a=-a;
t.b=-b;
return t;
}

void display(){
cout<<a<<" "<<b<<endl;
}
};
int main(){
complex c1,c2,c3;
c1.set(4.0,5.0);
c2.set(3.0,6.0);
c3=c1+c2;
c3.display();


complex c4=-c2;
c4.display();
}

1 change: 1 addition & 0 deletions C/Program 85
Submodule Program 85 added at 216e56
13 changes: 9 additions & 4 deletions C/program-1/program.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@

#include<stdio.h>
#includeR<conio.h>
int main()
{
/*initialization */
clrscr();
int n,i,j;
printf("enter the number of rows"); /*Input the number of rows */
scanf("%d",&n);
printf("Enter the number of rows"); /*Input the number of rows */
scanf("%d",&i);
print("Enter the number of columns");
scanf("%d",&j);
for(i=1;i<=n;i++) /*condition */
{
for(j=1;j<=i;j++)
{
printf(" %d",j); /*output */
{
printf("%d",n); /*output */
}
printf("\n");
}return 0;
Expand Down
3 changes: 2 additions & 1 deletion C/program-8/program.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <stdio.h>
int main()
{

clrscr();
int y,n,m,d,j;
printf("enter the input");
scanf("%d",&n);
Expand All @@ -12,4 +12,5 @@ int main()
printf("year=%d",y);
printf("months =%d",j);
printf("days=%d",d);
getch();
}
16 changes: 16 additions & 0 deletions C/program-84/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include<stdio.h>
int main(){
char str[100];
int i=0;
printf("Enter any string:");
gets(str);
//converting to uppercase
while(str[i]!= '\0'){
if(str[i]>=97&&str[i]<=122){
str[i]=str[i]-32;
}
i++;
}
printf("\nThe converted string is:%s", str);
return 0;
}
182 changes: 182 additions & 0 deletions C/program-84/program84.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
#include <stdio.h>
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#include <conio.h>
int gdriver=DETECT,gmode,x1=0,y1=0,k=0,c,a;
int bufx[150],bufy[150],dist=7,dspeed;
int rndx,rndy,tail=2,size,dash=0,score=0;
int choice;
char name[20];
void gameover();
void randomnumber();
void checkcollision(int x1,int y1);
void checkcapture(int x1,int y1);
void move();
void welcome();
void statusbar();
void record();
void main(){
// registerfarbgidriver(EGAVGA_driver_far);
initgraph(&gdriver,&gmode,"c:\\turboc3\\bgi");
size=tail;
welcome();
re:
cleardevice();
gotoxy(1,15);
printf("1 for easy\n2 for medium\n3 for hard\nEnter difficult:");
scanf("%d",&choice);
switch(choice){
case 1321: dspeed=200;break;
case 1: dspeed=160;break;
case 2: dspeed=60;break;
case 3: dspeed=20;break;
default: goto re;
};
cleardevice();
statusbar();
while((c=getch())!='\033'){
if (c=='\115'&&a!=2) a=1;
if (c=='\113'&&a!=1) a=2;
if (c=='\120'&&a!=4) a=3;
if (c=='\110'&&a!=3) a=4;
dash=0;
move();
}
}
void move(){
while(!kbhit()){
k=++k%size;
//prints body
setfillstyle(1,10);
setcolor(0);
bar3d(x1,y1,x1+dist,y1+dist,0,0);
setfillstyle(0,0);//emptyfill
setcolor(0);//black border
bar3d(bufx[k],bufy[k],bufx[k]+dist,bufy[k]+dist,0,0);//erases tail
bufx[k]=x1;
bufy[k]=y1;
setcolor(15);
checkcapture(x1,y1);
if(a==1) x1=x1+dist;//if right
if(a==2) x1=x1-dist;//if left
if(a==3) y1=y1+dist;//if down
if(a==4) y1=y1-dist;//if up
checkcollision(x1,y1);
/*prints head the same if no direction is obtained,
prints new head if direction altered*/
setfillstyle(1,2);
bar3d(x1,y1,x1+dist,y1+dist,0,0);
sound(300);
delay(dspeed);
nosound();
delay(dspeed);
}
}

void checkcollision(int x1,int y1){
int i;
for(i=1;i<=size;i++){
if((bufx[i]==x1)&&(bufy[i]==y1)) dash=1;
}
if((x1<0)||(x1>=400)||(y1<0)||(y1>400)) dash=1;
if(dash){
delay(300);
gameover();
}
statusbar();
}

void checkcapture(int x1,int y1){
if((x1==rndx)&&(y1==rndy)){
size++;score++;
sound(500);
delay(100);
randomnumber();
}
setfillstyle(1,4);
setcolor(4);
bar3d(rndx,rndy,rndx+dist,rndy+dist,0,0);
}
void statusbar(){
setcolor(15);
setcolor(14);
rectangle(0,0,400,410);
gotoxy(55,2);
printf("Score: %d",score);
gotoxy(55,5);
printf("Down: ");
putchar(31);
printf("\tUP");
putchar(30);
gotoxy(55,6);
printf("RIGHT :");
putchar(16);
printf("\tLEFT :");
putchar(17);
gotoxy(55,7);
printf("Press esc to exit");
settextstyle(4,0,3);
outtextxy(410,250,"KhwopaSnake");
}
void randomnumber(){
rndx=rand()%40*dist;
rndy=rand()%40*dist;
}
void gameover(){
sound(400);
delay(200);
nosound();
cleardevice();
delay(400);
setcolor(12);
settextstyle(5,0,5);
outtextxy(230,200,"You Died!");
gotoxy(25,23);
printf("%s scored %d ",name,score);
delay(500);

record();
fflush(stdin);
getch();
exit(0);
}
void record(){
char c;
FILE *info;
cleardevice();
info=fopen("record.txt","a+");
fprintf(info,"Playername:%-20s\tScore=%3d\n",name,score);
fclose(info);

gotoxy(25,5);
printf("List of players\n");
info=fopen("record.txt","r");
do{
putchar(c=getc(info));}
while(c!=EOF);
fclose(info);
printf("Press any key to exit");
delay(5000);
}
void welcome(){
gotoxy(25,25);
printf("Enter your name:");
gets(name);
cleardevice();
delay(100);
printf("Hello %s!",name);
delay(300);
setcolor(14);
settextstyle(10,0,3);
outtextxy(20,150,"Welcome to");
delay(400);
outtextxy(250,150," khwopa");
delay(300);
outtextxy(430,150," snake");
delay(200);
printf("Press any key to continue...\n");
printf("Dont eat yourself");
getch();

}
1 change: 1 addition & 0 deletions C/program-84/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# snake game in c
3 changes: 3 additions & 0 deletions C/program-86/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
program 86

C program to create and list of N fibonacci terms
Loading