Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
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
89e7cde
Merge pull request #87 from Vaidehi0421/b1
swaaz Oct 1, 2020
3786e5f
Merge pull request #94 from sanjay-xdr/master
swaaz Oct 1, 2020
16e6c90
Merge pull request #98 from swaaz/swaaz
swaaz Oct 1, 2020
addd1fc
Update readme.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
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
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 |



File renamed without changes.
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;
}
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
File renamed without changes.
26 changes: 26 additions & 0 deletions C/program-57/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <stdio.h>

int main () {
float score;
printf("Enter your total score (0-100): ");
scanf("%f",&score);
if(score < 0 || score > 100) {
printf("Enter score 0 - 100 \n");
} else if(score >= 80) {
printf("Score = %.2f , You Grade : A\n",score);
} else if(score >= 75) {
printf("Score = %.2f , You Grade : B+\n",score);
} else if(score >= 70) {
printf("Score = %.2f , You Grade : B\n",score);
} else if(score >= 65) {
printf("Score = %.2f , You Grade : C+\n",score);
} else if(score >= 60) {
printf("Score = %.2f , You Grade : C\n",score);
} else if(score >= 55) {
printf("Score = %.2f , You Grade : D+\n",score);
} else if(score >= 50) {
printf("Score = %.2f , You Grade : D\n",score);
} else {
printf("Score = %.2f , You Grade : F\n",score);
}
}
4 changes: 4 additions & 0 deletions C/program-57/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Program 57


Write a program in C to calculate the grade
24 changes: 24 additions & 0 deletions C/program-58/Program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include<stdio.h>
void main()

{
//float n[10];
int i,sum,a,b,x;
printf("enter the size of elements\n");
scanf("%d", &x);
float n[x];
printf("enter the values\n");
for (i=0;i<x;i++)
{
scanf("%f", &n[i]);
}
printf("enter the indexes to be added\n" );
scanf("%d%d", &a, &b);
sum=0;
for (;a<=b;a++)
{
sum = sum + n[a];
}

printf("\nThe sum of elements between the indexes is %d", sum);
}
4 changes: 4 additions & 0 deletions C/program-58/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Program 58


Write a program to find the sum of elements between indexes
64 changes: 64 additions & 0 deletions C/program-59/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#include<stdio.h>
#include<string.h>

typedef struct student
{

char name[25];
char usn[15];
float cgpa;
} S;
S s[70];


void search(char name[],int n)
{

int i,j;
// printf("%s\n",name);
for(i=0;i<n;i++)
{
if (strlen(name)==strlen(s[i].name))
{
for (j = 0; j < n; j++)
{
// printf("%s\n", s[i].name);
if(name[j]=name[j]) printf("Name: %s\nUSN: %s\nCGPA: %f\n", s[i].name, s[i].usn,s[i].cgpa);
break;
}
}
}
}

int main ()
{
int i,a,b, n;
char name[10];

printf ("*Enter student details**\n");
printf ("Enter number of students\n");
scanf ("%d", &n);
for (i = 0; i < n; i++)
{
printf ("Enter name\n");
scanf ("%s", s[i].name);
printf ("Enter USN\n");
scanf ("%s", s[i].usn);
printf ("Enter CGPA\n");
scanf ("%f",&s[i].cgpa);
}
for (i = 0; i < n; i++)
{
printf ("**Student details**\n");
printf ("Name: %s\tUSN: %s\tCGPA: %f\n", s[i].name, s[i].usn, s[i].cgpa);
}

printf ("*Search by name*\n");
printf ("enter the name\n");
scanf ("%s", name);
// printf("%s\n", name);
// name = s[i].name;
search(name,n);

}

4 changes: 4 additions & 0 deletions C/program-59/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Program 59


Write a program to Search Students details in a list
File renamed without changes.
4 changes: 4 additions & 0 deletions C/program-60/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Program 59


Write a program to print kaprekar number in a given range
23 changes: 23 additions & 0 deletions C/program-61/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include<stdio.h>
void 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();

}
16 changes: 16 additions & 0 deletions C/program-63/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include<stdio.h>
void main()
{
int n1,n2,n3,n4,n5;
float t;

printf("Enter Five Numbers:");
scanf("%d %d %d %d %d",&n1,&n2,&n3,&n4,&n5);

t=(n1+n2+n3+n4+n5)/5;

printf("The Average of %d,%d,%d,%d,%d is %f",n1,n2,n3,n4,n5,t);

getch();

}
9 changes: 9 additions & 0 deletions Java/program-2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Program 2

Given a String,check if it is a palindrome or not.

Variable description
s= Input String
start= Starting index of String s
end= Last index of String s
flag= Variable to mark if the String is not a Palindrome
26 changes: 26 additions & 0 deletions Java/program-2/program.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import java.io.*;
import java.util.*;
class prg{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
String s=sc.next();
int start=0;
int end=s.length()-1;
int flag=0;
while(start<end)
{
if(s.charAt(start)!=s.charAt(end))
{
flag=1;
break;
}
start++;
end--;
}
if(flag==1)
System.out.println("Given string is not a Palindrome");
else
System.out.println("Given string is a Palindrome");
}
}
3 changes: 3 additions & 0 deletions Java/program-3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Program-3

Write a program in java to count the number of consonants and vowels in a string.
17 changes: 17 additions & 0 deletions Java/program-3/program.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import java.io.*;
import java.util.*;
class Prg{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
String s=sc.next();
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')
v++;
}
System.out.println("Number of vowels "+v);
System.out.println("Number of consonants "+(s.length()-v));
}
}
Loading