Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
5c860fc
Added program in C
Vaidehi0421 Sep 30, 2020
d6c12f3
Added a program in C
Vaidehi0421 Sep 30, 2020
ee3f4fb
Create program.c
shreetanu Sep 30, 2020
64fe9d8
Created program
jainvaidehi Sep 30, 2020
acf8e04
Created README
jainvaidehi Sep 30, 2020
84b44ee
Added a program in C
Vaidehi0421 Sep 30, 2020
3927675
Create program.c
shreetanu Sep 30, 2020
ea5fdeb
Create Readme.md
shreetanu Sep 30, 2020
881fab4
Add program-55
claudiojpaz Oct 1, 2020
65ed8e3
new javascript programs
mgeethabhargava Oct 1, 2020
3bce936
Update program.c
aaarif796 Oct 1, 2020
70e4415
Delete a.out
aaarif796 Oct 1, 2020
5797178
Create readme.txt
aaarif796 Oct 1, 2020
4166dea
Add files via upload
sanjay-xdr Oct 1, 2020
e5eac41
Update README.md
sanjay-xdr Oct 1, 2020
6ebad9f
Add files via upload
sanjay-xdr Oct 1, 2020
c8c8542
Added Program 2 in java
Vaidehi0421 Oct 1, 2020
e391f38
Add files via upload
Arceus-sj Oct 1, 2020
2b3464c
Create README.md
Vaidehi0421 Oct 1, 2020
40dd6ac
Create Readme.md
Arceus-sj Oct 1, 2020
9a91028
Rename C++/Readme.md to C++/Program-2/Readme.md
Arceus-sj Oct 1, 2020
7751e09
Rename C++/number_of_occurrence.cpp to C++/Program-2/number_of_occurr…
Arceus-sj Oct 1, 2020
ad78aa2
Merge pull request #77 from Vaidehi0421/b4
swaaz Oct 1, 2020
edee3fd
Merge pull request #90 from swaaz/hacktoberfest
swaaz Oct 1, 2020
35c74a7
Merge pull request #78 from shreetanu/branchT-3
swaaz Oct 1, 2020
9ba9f9d
Merge pull request #79 from jainvaidehi/Branch-VV3
swaaz Oct 1, 2020
c1984c6
Merge pull request #72 from Vaidehi0421/b3
swaaz Oct 1, 2020
426b644
Merge pull request #81 from shreetanu/branchT-4
swaaz Oct 1, 2020
0291b9d
Merge pull request #91 from swaaz/hacktoberfest
swaaz Oct 1, 2020
4ba2b5d
Create swap_kth_Element.cpp
Arceus-sj Oct 1, 2020
56aabbf
Create Readme.md
Arceus-sj Oct 1, 2020
532e706
Merge pull request #82 from claudiojpaz/32bits-binary
swaaz Oct 1, 2020
d210397
Merge pull request #83 from Mgeethabhargava/master
swaaz Oct 1, 2020
3597979
Update and rename C/program-51/README.md to C/program-56/README.md
Vaidehi0421 Oct 1, 2020
a2e6bb6
Merge pull request #1 from Vaidehi0421/Vaidehi0421-patch-1
Vaidehi0421 Oct 1, 2020
edf67fd
Rename C/program-51/program.c to C/program-56/program.c
Vaidehi0421 Oct 1, 2020
92ba9ab
Merge pull request #85 from aaarif796/master
swaaz Oct 1, 2020
eb99810
Added sorting algorithm
Oct 1, 2020
a6761cc
Merge pull request #80 from Vaidehi0421/b5
swaaz Oct 1, 2020
e924e06
Merge pull request #93 from swaaz/hacktoberfest
swaaz Oct 1, 2020
89e7cde
Merge pull request #87 from Vaidehi0421/b1
swaaz Oct 1, 2020
6ac10f9
Merge pull request #89 from Arceus-sj/master
swaaz Oct 1, 2020
d9c3234
Merge pull request #92 from weeeihan/master
swaaz Oct 1, 2020
3786e5f
Merge pull request #94 from sanjay-xdr/master
swaaz Oct 1, 2020
b9dc71b
Merge pull request #95 from swaaz/master
swaaz Oct 1, 2020
24bc54d
added folder structure
swaaz Oct 1, 2020
16e6c90
Merge pull request #98 from swaaz/swaaz
swaaz Oct 1, 2020
addd1fc
Update readme.md
swaaz Oct 1, 2020
6d35b3e
Update contribution.md
swaaz Oct 1, 2020
94ffc54
Merge pull request #99 from swaaz/swaaz
swaaz Oct 1, 2020
50a209f
Write a program in C to calculate the grade example
Oct 1, 2020
6466ad0
Merge pull request #100 from tanut2539/develop
swaaz Oct 1, 2020
22df5ba
New programs
mgeethabhargava Oct 2, 2020
049ec89
Merge pull request #1 from swaaz/master
redfedted Oct 2, 2020
cd177c3
Added 2 c programs
redfedted Oct 2, 2020
0853887
Update README.md
redfedted Oct 2, 2020
83fd72e
Merge pull request #101 from Mgeethabhargava/master
swaaz Oct 2, 2020
6001594
Rename readme.txt to readme.md
swaaz Oct 2, 2020
1c6ac4e
Merge pull request #2 from redfedted/updates
redfedted Oct 2, 2020
6b0bb07
Updated Readme in C and seperated the programs
redfedted Oct 2, 2020
87d4694
Merge branch 'hacktoberfest' into master
swaaz Oct 2, 2020
42c043a
Merge pull request #108 from redfedted/master
swaaz Oct 2, 2020
9e0b558
Merge pull request #109 from swaaz/hacktoberfest
swaaz Oct 2, 2020
fb7ca2f
Create factorial.py
akku710 Oct 2, 2020
37c526a
Create README.md
akku710 Oct 2, 2020
5d6c7c0
Create prime number.py
akku710 Oct 2, 2020
f6b46b8
Create README.md
akku710 Oct 2, 2020
cfc92dd
Delete prime number.py
akku710 Oct 2, 2020
7b73ee0
Update README.md
akku710 Oct 2, 2020
8296e95
Delete README.md
akku710 Oct 2, 2020
941b031
Create program.c
gilbertraju Oct 3, 2020
18bfadb
Create program.c
gilbertraju Oct 3, 2020
ecda4af
Check a number is prime or not
akku710 Oct 3, 2020
e8eed8d
Added a program in java
Vaidehi0421 Oct 3, 2020
cb1c736
Merge pull request #1 from swaaz/master
jainvaidehi Oct 3, 2020
4243716
Created program
jainvaidehi Oct 3, 2020
af0ccb0
Created README
jainvaidehi Oct 3, 2020
b3f9c2c
Program.cpp
shreetanu Oct 3, 2020
1b74f97
Readme.md
shreetanu Oct 3, 2020
5033209
Update Readme.md
shreetanu Oct 3, 2020
4d634f1
added pattern.py
mahi252001 Oct 3, 2020
296738c
added pattern2.py
mahi252001 Oct 3, 2020
07e74b9
added pattern3.py
mahi252001 Oct 3, 2020
444a9cd
added program8.py
mahi252001 Oct 3, 2020
62003c1
added program
nireekshamn Oct 3, 2020
9cec13b
Add files via upload
RahulRao23 Oct 3, 2020
6435904
added second program
nireekshamn Oct 3, 2020
397dba0
Merge pull request #112 from aakashjain71098/aakash
swaaz Oct 3, 2020
7b798e1
Merge pull request #129 from RahulRao23/master
swaaz Oct 3, 2020
445c51d
Merge pull request #131 from swaaz/hacktoberfest
swaaz Oct 3, 2020
956ab0e
Merge pull request #117 from gilbertraju/third
swaaz Oct 3, 2020
9a8fddb
Merge pull request #119 from Vaidehi0421/b
swaaz Oct 3, 2020
2e73acf
Merge pull request #132 from swaaz/hacktoberfest
swaaz Oct 3, 2020
0dadc21
Check whether number is prime or not.
akku710 Oct 3, 2020
5e4e5b5
Program to calculate factorial of a number in C++
prajnakalpa Oct 3, 2020
c0bac91
Merge pull request #122 from jainvaidehi/Branchvv-5
swaaz Oct 3, 2020
ae92467
Merge pull request #135 from swaaz/hacktoberfest
swaaz Oct 3, 2020
4a497c2
Merge pull request #123 from shreetanu/branchT-6
swaaz Oct 3, 2020
f90c56b
Merge pull request #136 from swaaz/hacktoberfest
swaaz Oct 3, 2020
38c6c04
added readme.md
mahi252001 Oct 4, 2020
69a68e4
added readme.md
mahi252001 Oct 4, 2020
097b277
Delete pattern1.py
swaaz Oct 4, 2020
82258d5
Rename pattern2.py to pattern.py
swaaz Oct 4, 2020
08a6fe8
Merge pull request #127 from mahi252001/mahima2
swaaz Oct 4, 2020
103b38c
Merge pull request #128 from nireekshamn/nireeksha1
swaaz Oct 4, 2020
164a892
Rename Python/program-16/shufflecards.py to Python/program-11/shuffle…
swaaz Oct 4, 2020
5abc35d
Merge pull request #130 from nireekshamn/nireeksha3
swaaz Oct 4, 2020
83da926
Merge pull request #133 from aakashjain71098/aakash1
swaaz Oct 4, 2020
f17546e
Merge pull request #134 from prajnakalpa/master
swaaz Oct 4, 2020
1fd6544
add my python file
keerthika15 Oct 5, 2020
f23a705
add my python file
keerthika15 Oct 5, 2020
7dc569d
add my python file
keerthika15 Oct 5, 2020
9842254
add my python file
keerthika15 Oct 5, 2020
1eea1d8
Merge pull request #153 from swaaz/master
swaaz Oct 5, 2020
13bf5e4
added gif
swaaz Oct 5, 2020
c52c699
Merge pull request #154 from swaaz/swaaz
swaaz Oct 5, 2020
3e8f4ed
Merge pull request #151 from keerthika15/key3
swaaz Oct 5, 2020
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 .github/ISSUE_TEMPLATE/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
eg-git push origin -u swaaz
- The given link should be copied and pasted in web browser or go to your repo in web browser
- Create a pull request
- tag @swaaz under review section
## If you are contributing for the first time,then :
[click here](https://gitme.js.org/)

7 changes: 7 additions & 0 deletions C++/Program-2/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Program 2:

Write a Program to find the number of occurrence of X element present in sorted array.
Variable description-->
n = size of array/ number of element
x = Element to be counted in array
count = veriable to count the X-number in array
42 changes: 42 additions & 0 deletions C++/Program-2/number_of_occurrence.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#include<bits/stdc++.h>

using namespace std;

class Solution{
public:

/*
if x is present in arr[] then returns the count
of occurrences of x, otherwise returns 0.
*/

int count(int arr[], int n, int x) {

int count = 0;
for(int i=0;i<n;i++){
if(arr[i] == x){
count++;
}
}
return count;
}
};



int main() {

int n, x;
cout<<"Enter the size of an Array: ";
cin >> n ;
cout<<"Enter a number to be counted: ";
cin>>x;
int arr[n];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
Solution ob;
auto ans = ob.count(arr, n, x);
cout<< "number "<<x<<" counted in array for " << ans <<" times."<< "\n";
return 0;
}
4 changes: 4 additions & 0 deletions C++/Program-3/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Program to Swap the Kth Elements of a series.
variable description -->
n = number of elements/size
k = Kth element for swaping
45 changes: 45 additions & 0 deletions C++/Program-3/swap_kth_Element.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include<iostream>

using namespace std ;

void takeInput(int a[], int n){
for(int i=1;i<=n;i++){
cin>>a[i];
}
}

void swap_k(int a[], int n, int k){

int i , count = n ;
for(i=1 ; i<=n , count >= 1 ; i++ , count--){

if(k == i || k == count){
swap(a[k],a[count]);
}

}

for(i=1;i<=n;i++){
cout<<a[i]<<" " ;
}
}

int main()
{

int n;
cout<<"Enter size of an Array:";
cin>>n ;

int k;
cout<<"Enter Kth element to swap:";
cin>>k ;

int a[1000];
takeInput(a,n);

swap_k(a,n,k);
cout<<"\n";

return 0;
}
2 changes: 2 additions & 0 deletions C++/Program-4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Program -4
Program to find the reverse of a string
29 changes: 29 additions & 0 deletions C++/Program-4/factorial.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int n,size=200,fact[size],j=size-1,carry=0;
cin>>n;
fact[size-1]=1;
while(n>1){
int x;
for(int k=size-1;k>=j;k--){
x=fact[k]*n+carry;
fact[k]=x%10;
carry=x/10;}
while(carry>0){
fact[--j]= carry%10;
carry/=10;}
n--;
}
for(int k=j;k<size;k++){
cout<<fact[k];
}
cout<<endl;
}
return 0;
}

13 changes: 13 additions & 0 deletions C++/Program-4/program.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>
using namespace std;

int main() {
string s;
cout<<"Enter the string"<<endl;
cin>>s;
int n=s.length();
for (int i = 0; i < n / 2; i++)
swap(s[i], s[n - i - 1]);
cout<<s;
return 0;
}
1 change: 1 addition & 0 deletions C++/Program-4/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to find factorial of a number
13 changes: 13 additions & 0 deletions C++/Program-5/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Program 5

Write a program to find the sum of the digits of the given number.

Variable description--

n=Number

sum= Holds the sum

rem=Holds the single digit of the number

temp=Temporarily holds the value of n
18 changes: 18 additions & 0 deletions C++/Program-5/program.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <iostream>
using namespace std;

int main() {
cout<<"enter the number\n";
int n;
cin>>n;
int temp, rem, sum = 0;
temp = n;
while(temp>0)
{
rem = temp%10;
temp = temp/10;
sum+=rem;
}
cout<<"\nThe sum is "<<sum;
return 0;
}
17 changes: 15 additions & 2 deletions C/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,20 @@
| Program-44 | Program for implementation of the approach |
| Program-45 | Program to illustrate the above given pattern of numbers. |
| Program-46 | Program to convert binary number to decimal |
| Program-47 | Program to print kaprekar number in a given range |

| Program-47 | Program to find the maximum and minimum element in an array|
| Program-48 | Program to check if a number is even or odd |
| Program-49 | Program to find the sum of the digits of the given number |
| Program-50 | Program to check whether a given number is a palindrome or not |
| Program-51 | Program to print duplicates in an array |
| Program-52 | to find whether the given element is present in the array or not |
| Program-53 | Program to find the position of an element in an array |
| Program-54 | Program to check whether two strings are anagrams or not |
| Program-55 | Program to print print a number in binary |
| Program-56 | Program to calculate the number of vowels and consonants in a string |
| Program-57 | Program to calculate the grade |
| Program-58 | Program to find the sum of elements between indexes |
| Program-59 | Program to Search Students details in a list |
| Program-60 | Program to print kaprekar number in a given range |



8 changes: 4 additions & 4 deletions C/program-2/program.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ return 1;
int main() /*main function */
{
int n;
printf("enter the number");
printf("Enter the number:");
scanf("%d",&n);
if(isprime(n)==0)
{
printf(" not prime");
printf("%d is not prime number.",n);
}
else if(isprime(n)==1)
{
printf("prime");
printf("%d is a prime number.",n);
}
return 0;
}
}
6 changes: 6 additions & 0 deletions C/program-25/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This program is to print the number of *. Example if user enter 5. Then it'll print
*
**
***
****
*****
33 changes: 33 additions & 0 deletions C/program-47/program 47.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <time.h>
#include <stdio.h>
#include <stdlib.h>

int main()
{
/* Length of the password */
int length;
int num;
int temp;
printf("Enter the length of the password: ");
scanf("%d", &length);
printf("\nEnter the number of passwords you want: ");
scanf("%d", &num);
/* Seed number for rand() */
srand((unsigned int) time(0) + getpid());

while(num--)
{
temp = length;
printf("\n");
while(temp--) {
putchar(rand() % 56 + 65);
srand(rand());
}

temp = length;
}

printf("\n");

return EXIT_SUCCESS;
}
5 changes: 5 additions & 0 deletions C/program-48/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Program 48

Added a program to check if a number is even or odd.
Variable description-
num-Input number
11 changes: 11 additions & 0 deletions C/program-48/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <stdio.h>

int main() {
int num;
printf("Enter a number \n");
scanf("%d",&num);
if(num%2==0)
printf("%d is an even number",num);
else
printf("%d is an odd number",num);
}
3 changes: 3 additions & 0 deletions C/program-51/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Program 51

Write an program to print duplicates in an array.
20 changes: 20 additions & 0 deletions C/program-51/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <stdio.h>

int main() {
int arr[100],freq[100];
int n,i;
printf("Enter the number of elements in array \n");
scanf("%d",&n);
printf("Enter elements in the array \n");
for(i=0;i<n;i++)
{
scanf("%d",&arr[i]);
freq[arr[i]]++;
}
for(i=0;i<n;i++)
{
if(freq[i]>1)
printf("%d ",i);
}
printf("\n");
}
1 change: 1 addition & 0 deletions C/program-53/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to find the position of an element in an array
22 changes: 22 additions & 0 deletions C/program-53/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include<stdio.h>
int main()
{
int a[100],n,el,i;
printf("Enter the size of the array");
scanf("%d",&n);
printf("Enter the elements of the array");
for(int i=0;i<n;++i)
scanf("%d",&a[i]);
printf("Enter the element to be searched");
scanf("%d",&el);
for(i=0;i<n;++i)
{
if(el==a[i])
break;
}
if(i==n)
printf("element not found in the array");
else
printf("element found at %d",i+1);
return 0;
}
3 changes: 3 additions & 0 deletions C/program-54/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
A program in C which checks whether two strings are anagrams or not

An anagram of a string is another string that contains same characters, only the order of characters can be different.
31 changes: 31 additions & 0 deletions C/program-54/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include<stdio.h>
int main()
{
char a[100],b[100];
int f[26]={0};
int s[26]={0};
int k;
int len1,len2;
printf("Enter the two strings\n");
fgets(a,100,stdin);
fgets(b,100,stdin);
for(int i=0;a[i]!='\0';++i)
f[a[i]-'a']+=1;
for(int i=0;b[i]!='\0';++i)
s[b[i]-'a']+=1;
len1 = sizeof(a)/sizeof(a[0]);
len2 = sizeof(b)/sizeof(b[0]);
if(len1 == len2)
{
for(k=0;k<26;++k)
if(f[k]!=s[k])
break;
if(k==26)
printf("The strings are anagrams.\n");
else
printf("The strings aren't anagrams.");
}
else
printf("The strings aren't anagrams.");
return 0;
}
Loading