Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e32282d
Merge pull request #223 from swaaz/hacktoberfest
swaaz Oct 14, 2020
2f98203
Merge pull request #224 from sharansk792000/master
swaaz Oct 14, 2020
80b0189
Merge pull request #225 from swaaz/hacktoberfest
swaaz Oct 14, 2020
25dac47
Merge pull request #226 from sharansk792000/master
swaaz Oct 14, 2020
a2e79a1
Merge pull request #227 from swaaz/hacktoberfest
swaaz Oct 14, 2020
2553a75
Add files via upload
Arceus-sj Oct 15, 2020
cf8f562
Create Readme.md
Arceus-sj Oct 15, 2020
3137892
Rename C++/PrintSeries.cpp to C++/Program18/PrintSeries.cpp
Arceus-sj Oct 15, 2020
2561c65
Read me
Mayanksingla139 Oct 15, 2020
f32c130
Merge pull request #1 from Mayanksingla139/Mayanksingla139-patch-1
Mayanksingla139 Oct 15, 2020
cca9858
Delete program-19
Mayanksingla139 Oct 15, 2020
e731e41
Update readme.md
swaaz Oct 15, 2020
e60c038
Merge pull request #228 from Arceus-sj/master
swaaz Oct 15, 2020
3dec886
To check whether a number is in palindrome or not
Mayanksingla139 Oct 16, 2020
e9b593f
Merge pull request #229 from Mayanksingla139/Mayanksingla139
swaaz Oct 16, 2020
419d1e1
Update README.md
Shravyarshetty Oct 16, 2020
340cc4b
Merge pull request #230 from Shravyarshetty/master
swaaz Oct 16, 2020
28a6bac
Update README.md
Shravyarshetty Oct 16, 2020
64ab4b3
Merge pull request #231 from Shravyarshetty/master
swaaz Oct 16, 2020
8c2efab
Update README.md
Shravyarshetty Oct 16, 2020
2ba1153
Merge pull request #232 from Shravyarshetty/master
swaaz Oct 16, 2020
b56d4d4
Create square_root_using_binary_search.cpp
Sitispeaks Oct 17, 2020
1ab5108
Create Readme.md
Sitispeaks Oct 17, 2020
2073756
Rename square_root_using_binary_search.cpp to program.cpp
Sitispeaks Oct 17, 2020
136155c
Update and rename Readme.md to README.md
Sitispeaks Oct 17, 2020
5e1fde8
Merge pull request #233 from Sitispeaks/master
swaaz Oct 17, 2020
be79008
A program in Dart
your-name123 Oct 18, 2020
b43f37f
Create README.md
AK1406 Oct 18, 2020
b6503a5
Merge pull request #234 from Anju1415/dart
swaaz Oct 19, 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
4 changes: 4 additions & 0 deletions C++/Program-20/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## To find the square root of a number upto "p" no of places


Here we take input of that number "num" and the number "p"
45 changes: 45 additions & 0 deletions C++/Program-20/program.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include<bits/stdc++.h>
using namespace std;


float square_root(int num,int p) {
int s=0;
int e=num;
float ans=-1;
while(s<=e) {
int mid=s+e>>1; // (s+e)/2
if(mid*mid==num) {
return mid;
}
else if(mid*mid>=num) {
e=mid-1;

}
else { //as 7*7 is vey close to 50
s=mid+1;
ans=mid;
}
}

//for floating part
//brute force
float inc=0.1;
for(int i=1;i<=p;i++) {
while(ans*ans<=num) {
ans=ans+inc;
}
//when this blows up
ans=ans-inc;//comeback 1 step
inc/=10;
}
return ans;

}

int main() {
int num,p;
cin>>num;///the input number of which you want to find the square root
cin>>p;//find the square root upto "p" no of places
cout<<square_root(num,p)<<endl;
return 0;
}
27 changes: 27 additions & 0 deletions C++/Program18/PrintSeries.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include<iostream>

using namespace std;

void printSeries(int num1,int num2){
int count = 1;
int i = 1;
while(count < num1+1){
int num = (3 * i) + 2;
i++;

if((num % num2) == 0){

}else{
cout<<num<<endl;
count++;
}
}
}

int main()
{
int num1,num2;
cin>>num1>>num2;
printSeries(num1,num2);
return 0;
}
33 changes: 33 additions & 0 deletions C++/Program18/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Problem

```bash
Write a function which prints first num1 terms of the series 3n+2 which are not multiples of num2.
```

## Take Input
```bash
Number 1(num1)
Number 2(num2)
0 < num1 < 100 & 0 < num2 < 100
```

## Sample Input

```bash
num1 = 10;
num2 = 4;
```
## Sample Output

```bash
5
11
14
17
23
26
29
35
38
41
```
1 change: 1 addition & 0 deletions C++/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
| Program-10 | Program to find the missing number in a Sorted Array.
| Program-15 | Program to find modular exponentiation.

| Program-19| To check whether a number is in palindrome or not
1 change: 1 addition & 0 deletions C++/program-19/Read me.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# To check whether a number is in palindrome or not
23 changes: 23 additions & 0 deletions C++/program-19/palindrome.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>
using namespace std;
int main()
{
int num, temp, digit, rev = 0;

cout << "Enter a positive number: ";
cin >> num;
temp = num;
while (num != 0){
digit = num % 10;
rev = (rev * 10) + digit;
num = num / 10;
}
cout << "The reverse of the number is: " << rev << endl;
if (temp == rev){
cout<<"The number is a palindrome.";
}
else{
cout << "The number is not a palindrome.";
}
return 0;
}
3 changes: 3 additions & 0 deletions Dart/Program1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Q1. Write a program to check given number is even or odd.

Ask the number from user in variable "number"
14 changes: 14 additions & 0 deletions Dart/Program1/checkevenodd.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'dart:io';

void main() {
int number;

print("Enter a number : ");
number = int.parse(stdin.readLineSync());

if (number.isEven) {
print("$number is an even number");
} else if (number.isOdd) {
print("$number is an odd number");
}
}
13 changes: 12 additions & 1 deletion Python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,15 @@
| 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. |
| Program-20 | Program to create an array of range specified and print. |
| Program-21 | Program to print the number of *. |
| Program-22 | Program to check if a number is even or odd |
| Program-23 | Program to find the all the prime numbers between the given range. |
| Program-24 | Program to convert binary number to decimal |
| Program-25 | Program of a car game which shows if the car has started or stopped |
| Program-26 | Program of a guessing game in which u guess the secret number with a guessing limit of 3 attempts. |
| Program-27 | Program which tells you the of downpayment of the house is 10% or 20%
depending if the owner has a good credit or not.The price of the house is to be entered in the output |
| Program-28 | Program to find out the GCD of any 2 given numbers |
| Program-29 | Program which will display the fibonacci series |
| Program-31 | Program to print Amstrong numbers |
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@

### Tada you just made a contribution ✨. Pat your back 👏 <br/><br/>

### If you have never made a PR before 😕, no worries, follow these steps to get going [👉click me](https://gitme.js.org/)
### If you have never made a PR before 😕, no worries, follow these steps to get going [👉click me](https://gitgo.swaaz.me/)