Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
36d3cf2
added readme.md.py
mahi252001 Oct 4, 2020
5b6a5e8
added readme.md.py
mahi252001 Oct 4, 2020
73788a2
added readme.md
mahi252001 Oct 4, 2020
c6fcd94
removed pattern1.py
mahi252001 Oct 4, 2020
c05a5b0
modified readme.md
mahi252001 Oct 4, 2020
594a6b4
find prime numbers between numbers
just-tech20 Oct 4, 2020
62f5533
Update README.md
just-tech20 Oct 4, 2020
178b114
renamed the file
mahi252001 Oct 5, 2020
de25181
renamed the file
mahi252001 Oct 5, 2020
ef03f50
Very short way to find vowels
Oct 5, 2020
332be52
added program
nireekshamn Oct 5, 2020
f0a2253
Merge pull request #160 from swaaz/hacktoberfest
swaaz Oct 6, 2020
bea0c6e
Merge pull request #163 from swaaz/hacktoberfest
swaaz Oct 6, 2020
69f8d3e
Update readme.md
swaaz Oct 6, 2020
478f205
New javascript programs
mgeethabhargava Oct 7, 2020
949677e
Rename Python/program-12/pattern.py to Python/program-17/pattern.py
swaaz Oct 7, 2020
44212d8
Rename Python/program-12/readme.md to Python/program-17/readme.md
swaaz Oct 7, 2020
74d2e82
Rename pattern.py to program.py
swaaz Oct 7, 2020
9b2c3ad
Update readme.md
swaaz Oct 7, 2020
b0aa704
Rename Python/program-13/readme.md to Python/program-18/readme.md
swaaz Oct 7, 2020
5af3237
Rename Python/program-13/pattern2.py to Python/program-18/program.py
swaaz Oct 7, 2020
e78ca57
Merge pull request #124 from mahi252001/mahima
swaaz Oct 7, 2020
58518d9
Merge pull request #142 from just-tech20/add_program
swaaz Oct 7, 2020
ad20d03
Merge pull request #147 from Akashkpdroid/akashchanges
swaaz Oct 7, 2020
21198e4
Rename Python/program-17/Bitodec.py to Python/program-18/program.py
swaaz Oct 7, 2020
2dbc66f
Rename Python/program-17/readme.md to Python/program-18/readme.md
swaaz Oct 7, 2020
1125646
Rename Python/program-18/program.py to Python/program-19/program.py
swaaz Oct 7, 2020
2db2b0e
Rename Python/program-18/readme.md to Python/program-19/readme.md
swaaz Oct 7, 2020
3463a6d
Merge pull request #150 from nireekshamn/nireeksha5
swaaz Oct 7, 2020
946dd34
Merge pull request #164 from Mgeethabhargava/master
swaaz Oct 7, 2020
876a80d
Update readme.md
swaaz Oct 7, 2020
e8afe45
Program.cpp
shreetanu Oct 7, 2020
52f35c0
Readme.md
shreetanu Oct 7, 2020
f3d14d5
Merge pull request #168 from swaaz/hacktoberfest
swaaz Oct 7, 2020
49580f2
Merge pull request #167 from shreetanu/branchT-8
swaaz Oct 7, 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
10 changes: 10 additions & 0 deletions C++/Program-6/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Program 6

Write a program to find the greatest common divisor of two number.

Variable description--

x=Holds the first number

y=Holds the second number

16 changes: 16 additions & 0 deletions C++/Program-6/program.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>
using namespace std;
int gcd(int x,int y)
{
if(y==0)
return x;
return gcd(y,x%y);
}

int main() {
cout<<"enter the numbers\n";
int x,y;
cin>>x>>y;
cout<<"The GCD is "<<gcd(x,y);
return 0;
}
58 changes: 58 additions & 0 deletions C/Program-61/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
This Program calulates all the prime between the range of numbers
includes the numbers which is provided.

For e.g: 2 7
Prime Numbers are : 2 3 5 7
*/

#include <stdio.h>
#include <stdlib.h>

char primecheck(int);

int main()
{
int i,num1,num2,cases;
char ans;
printf("Enter Number of Test Cases: ");
scanf("%d",&cases);
while (cases--)
{
printf("Enter First Number: ");
scanf("%d",&num1);
printf("Enter Second Number: ");
scanf("%d",&num2);

printf("Answer: ");
for(i=num1;i<=num2;i++)
{
ans = primecheck(i);
if (ans == 'y')
printf("%d ",i);
}
printf("\n");
}
return 0;
}

char primecheck(int num)
{
int i;
if (num == 0 || num == 1)
return 'n';
else
{
for(i=(num-1);i>1;i--)
{
if(num%i == 0)
{
return 'n';
}
else
continue;
}
return 'y';
}

}
1 change: 1 addition & 0 deletions C/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
| 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 |
| Program-61 | Program to find the all the prime numbers between the numbers |



4 changes: 2 additions & 2 deletions Java/program-3/program.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ public static void main(String args[])
int v=0;
for(int i=0;i<s.length();i++)
{
if(s.charAt(i)=='a'||s.charAt(i)=='e'||s.charAt(i)=='i'||s.charAt(i)=='o'||s.charAt(i)=='u'||s.charAt(i)=='A'||s.charAt(i)=='E'||s.charAt(i)=='I'||s.charAt(i)=='O'||s.charAt(i)=='U')
if(("AEIOUaeiou").indexOf(s.charAt(i))!=-1)//checking for vowel in shorter way
v++;
}
System.out.println("Number of vowels "+v);
System.out.println("Number of consonants "+(s.length()-v));
}
}
}
15 changes: 15 additions & 0 deletions Javascript/program-10/program-10.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<body>

<h2>My First Web Page</h2>
<p>My First Paragraph.</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = 5 + 6;
</script>

</body>
</html>
4 changes: 4 additions & 0 deletions Javascript/program-10/read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Program-10

## This is a javascript program for javascript writing into an html element

16 changes: 16 additions & 0 deletions Javascript/program-9/program-9.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<body>

<h2>My First Web Page</h2>
<p>My first paragraph.</p>

<p>Never call document.write after the document has finished loading.
It will overwrite the whole document.</p>

<script>
document.write(5 + 6);
</script>

</body>
</html>
4 changes: 4 additions & 0 deletions Javascript/program-9/read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Program-9

## This is a javascript program for javascript writing into html output

10 changes: 10 additions & 0 deletions Python/program-17/program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
for i in range(1,6):
for j in range(1,6-i):
print(" ",end=" ")
for k in range(1,i+1):
print(k,end=" ")
if i>1:
for l in range(1,i+1):
print(l,end=" ")
print()

7 changes: 7 additions & 0 deletions Python/program-17/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PROGRAM-17
To print the given pattern(pattern.py)
1
1 2 1 2
1 2 3 1 2 3
1 2 3 4 1 2 3 4
1 2 3 4 5 1 2 3 4 5
4 changes: 4 additions & 0 deletions Python/program-18/program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
for i in range(1,6):
for j in range(1,i+1):
print(i,end=' ')
print()
6 changes: 6 additions & 0 deletions Python/program-18/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
program to print the given pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
14 changes: 14 additions & 0 deletions Python/program-19/program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Python Program to Convert Decimal to Binary

def decimalToBinary(num):
"""This function converts decimal number
to binary and prints it"""
if num > 1:
decimalToBinary(num // 2)
print(num % 2, end='')


# decimal number
number = int(input("Enter any decimal number: "))

decimalToBinary(number)
1 change: 1 addition & 0 deletions Python/program-19/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Program to convert Binary to Decimal
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="./gif/giphy.gif" width="300x" >
</div>

## This repo is an awesome collection of basic programs in different programming languages⚡
## This Repository is an awesome collection of basic programs in different programming languages⚡
<div align="center">
<!-- languages -->
<img src="https://img.shields.io/badge/python%20-%2314354C.svg?&style=for-the-badge&logo=python&logoColor=white" height= 25px width=80px/>
Expand All @@ -16,6 +16,7 @@

## ⚠️Points to note before you start contributing
- Check whether the program you are going to add already exists in the repo or not. Make sure you're not repeting any program.
- Do add readme.md file for explaining the question , input and output for each program.
- Please go through [How to contribute](#contribute) and do accordingly to make a smooth contribution.
<br/><br/>

Expand Down