Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
1650800
Merge pull request #1 from RachithaRai/tatti
RachithaRai Oct 12, 2019
e922ede
new javascript programs
mgeethabhargava Oct 3, 2020
61ca478
Merge pull request #125 from Mgeethabhargava/master
swaaz Oct 3, 2020
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
5611c6e
Merge pull request #2 from RachithaRai/swaaz
RachithaRai Oct 5, 2020
39a4c1c
Merge pull request #3 from RachithaRai/tatti
RachithaRai Oct 5, 2020
e663634
Merge pull request #4 from swaaz/master
RachithaRai Oct 5, 2020
18998da
Merge pull request #5 from swaaz/master
RachithaRai Oct 5, 2020
89d971e
Merge pull request #1 from swaaz/master
RahulRao23 Oct 5, 2020
f290af5
updated README.md
RahulRao23 Oct 6, 2020
ae50249
Merge pull request #159 from RahulRao23/master
swaaz Oct 6, 2020
f0a2253
Merge pull request #160 from swaaz/hacktoberfest
swaaz Oct 6, 2020
21f7a69
Update readme
RachithaRai Oct 6, 2020
3cf0c2f
Merge pull request #162 from RachithaRai/master
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
443426f
new program
RahulRao23 Oct 7, 2020
e8afe45
Program.cpp
shreetanu Oct 7, 2020
52f35c0
Readme.md
shreetanu Oct 7, 2020
8ae114e
Merge pull request #166 from RahulRao23/master
swaaz Oct 7, 2020
9214b3b
Rename Python/program-17/program.py to Python/program-18/program.py
swaaz Oct 7, 2020
d33b8c9
Rename Python/program-18/program.py to Python/program-19/program.py
swaaz Oct 7, 2020
d45d9e7
Rename Python/program-19/program.py to Python/program-20/program.py
swaaz 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
c462e56
Merge pull request #169 from swaaz/master
swaaz Oct 7, 2020
83949f4
Merge pull request #3 from swaaz/hacktoberfest
RahulRao23 Oct 7, 2020
035a6f4
Updated README.md
RahulRao23 Oct 7, 2020
dc7763b
Merge pull request #6 from swaaz/hacktoberfest
RachithaRai Oct 7, 2020
bb8a8ac
add program
RachithaRai Oct 7, 2020
d6b78b5
Merge pull request #170 from RahulRao23/master
swaaz Oct 7, 2020
66fa332
Merge pull request #171 from RachithaRai/master
swaaz Oct 7, 2020
9f607b5
Merge pull request #172 from swaaz/hacktoberfest
swaaz Oct 7, 2020
c813101
Added new programs
RahulRao23 Oct 7, 2020
68f960d
Merge pull request #176 from RahulRao23/master
swaaz Oct 7, 2020
e929f1b
Merge pull request #177 from swaaz/hacktoberfest
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;
}
29 changes: 29 additions & 0 deletions C++/Program-7/program.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <iostream>
using namespace std;

int main()
{
int rows, n = 1;

cout << "Enter number of rows: \n";
cin >> rows;

for(int i = 0; i < rows; i++)
{
for(int line = 1; line <= rows-i; line++)
cout <<" ";

for(int j = 0; j <= i; j++)
{
if (j == 0 || i == 0)
n = 1;
else
n = n*(i-j+1)/j;

cout << n << " ";
}
cout << endl;
}

return 0;
}
1 change: 1 addition & 0 deletions C++/Program-7/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C++ Program to print Pascal' triangle
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 |



77 changes: 56 additions & 21 deletions C/program-61/program.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,58 @@
#include<stdio.h>
void main()
/*
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()
{
double r,area,circum;//Initializing varaibles

printf("Enter Radius:");
scanf("%lf",&r);//getting radius.

if(r<10)//Checks if radius is less than 10
{
circum = 2*3.14*r;//Circumference of a circle is 2*pi*r.

printf("The Circumference of the Circle with the given radius is: %lf",circum);//printing Circumference
}
else//If r is NOT less that 10....i.e. r is greater than 10
{
area = 3.14*r*r;//Area of a circle is pi*r*r.

printf("The Area of the Circle with the given radius is: %lf",area);//printing The area
}
getch();

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';
}

}
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

2 changes: 1 addition & 1 deletion Javascript/program-6/read.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Program-4
# Program-6
## This is a javascript program for character processing

33 changes: 33 additions & 0 deletions Javascript/program-7/program-7.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<html>
<head>
<title>Searching strings with index Of amd LastIndex of</title>

<script type="text/javascript">
var l="abcdefghijklmnopqrstuvwxzabcdefghijklm"
function buttonPressed()
{

sForm.first.value=l.indexOf(sForm.inputVal.value);
sForm.last.value=l.lastIndexOf(sForm.inputVal.value);
sForm.firstl2.value=l.indexOf(sForm.inputVal.value,12);
sForm.lastl2.value=l.lastIndexOf(sForm.inputVal.value,12);
}
</script>
</head>
<body>
<form name="sForm" action="">
<h1>The String to search is:</br>abcdefghijklmnopqrstuvwxyzabcdefghijklm</h1>
<p>Enter substring to search for
<input name="inputVal" type="text"/>
<input name="search" type="button" value="search" onclick="buttonPressed()"/><br/></p>
<p>First Occurace located at index
<input name="first" type="text" size="5"/>
<br/>Last occurance located at index
<input name="last" type="text" size="5"/>
<br/>First occurance from index l2 located at index
<input name="firstl2" type="text" size="5"/>
<br/>last occurance from index l2 located at index
<input name="lastl2" type="text" size="5"/></p>
</form>
</body>
</html>
4 changes: 4 additions & 0 deletions Javascript/program-7/read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Program-7

## This is a javascript program for string searching

21 changes: 21 additions & 0 deletions Javascript/program-8/program-8.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = "Welcome to Javacsript!";
}
</script>
</head>

<body>

<p>When you click "Try it", a function will be called.</p>
<p>The function will display a message.</p>

<button onclick="myFunction()">Try it</button>

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

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

## This is a javascript program for javascript function basic program

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

7 changes: 0 additions & 7 deletions Python/Program-3/README.md

This file was deleted.

24 changes: 24 additions & 0 deletions Python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Python-basicprograms
## This repo contains basics programs in Python programming language.
| Program No.| Question |
| ------- | ------ |
| Program-01 | Program to print Hello World. |
| Program-02 | Program to find the factorial of a number. |
| Program-03 | Program to find if the string is Palindrom or not. |
| Program-04 | Program to find sum of two numbers. |
| Program-05 | Program to print a pattern. |
| Program-06 | Program to print a pattern. |
| Program-07 | Program to print a pattern. |
| Program-08 | Program to print a pattern. |
| Program-09 | Program to check if the number is armstrong or not. |
| Program-10 | Program to shuffle a deck of cards. |
| Program-11 | Program to print fibonacci series. |
| Program-12 | Program to check if a number is prime or not. |
| Program-13 | Program to find a number in an array using binary search. |
| Program-14 | Program to find simple interest for given principal amount, time and rate of interest. |
| Program-15 | Program to sort the array and give the time to sort the array. |
| Program-16 | Program to print a right angled triangle. |
| Program-17 | Program to convert Binary to Decimal. |
| Program-18 | Program to check leap year or not. |
| Program-19 | Program to count number of integers between 1 to 50 divisible by a number. |
| Program-20 | Program to create an array of range specified and print. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion Python/program-18/git3.py → Python/program-14/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# for given principal amount, time and
# rate of interest.


def simple_interest(p,t,r):
print('The principal is', p)
print('The time period is', t)
Expand Down
1 change: 0 additions & 1 deletion Python/program-14/readme.md

This file was deleted.

File renamed without changes.
1 change: 0 additions & 1 deletion Python/program-15/readme.md

This file was deleted.

6 changes: 3 additions & 3 deletions Python/program-4/triangle.py → Python/program-16/program.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
for i in range(5):
for j in range(i):
print('*', end=' ')
for i in range(5):
for j in range(i):
print('*', end=' ')
print()
Loading