From 2553a75d6311b2d946f24f8d26a923e20e969452 Mon Sep 17 00:00:00 2001 From: Arceus-sj <71997730+Arceus-sj@users.noreply.github.com> Date: Thu, 15 Oct 2020 21:33:05 +0530 Subject: [PATCH 01/16] Add files via upload --- C++/PrintSeries.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 C++/PrintSeries.cpp diff --git a/C++/PrintSeries.cpp b/C++/PrintSeries.cpp new file mode 100644 index 00000000..08392ff3 --- /dev/null +++ b/C++/PrintSeries.cpp @@ -0,0 +1,27 @@ +#include + +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<>num1>>num2; + printSeries(num1,num2); + return 0; +} \ No newline at end of file From cf8f562ca21b341e2cf6244d7a043fa69f95001d Mon Sep 17 00:00:00 2001 From: Arceus-sj <71997730+Arceus-sj@users.noreply.github.com> Date: Thu, 15 Oct 2020 21:39:41 +0530 Subject: [PATCH 02/16] Create Readme.md --- C++/Program18/Readme.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 C++/Program18/Readme.md diff --git a/C++/Program18/Readme.md b/C++/Program18/Readme.md new file mode 100644 index 00000000..9118f569 --- /dev/null +++ b/C++/Program18/Readme.md @@ -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 +``` From 3137892ef6b1dcb24f697b5189be2664defda3b9 Mon Sep 17 00:00:00 2001 From: Arceus-sj <71997730+Arceus-sj@users.noreply.github.com> Date: Thu, 15 Oct 2020 21:55:21 +0530 Subject: [PATCH 03/16] Rename C++/PrintSeries.cpp to C++/Program18/PrintSeries.cpp --- C++/{ => Program18}/PrintSeries.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename C++/{ => Program18}/PrintSeries.cpp (93%) diff --git a/C++/PrintSeries.cpp b/C++/Program18/PrintSeries.cpp similarity index 93% rename from C++/PrintSeries.cpp rename to C++/Program18/PrintSeries.cpp index 08392ff3..efb8b7f7 100644 --- a/C++/PrintSeries.cpp +++ b/C++/Program18/PrintSeries.cpp @@ -24,4 +24,4 @@ int main() cin>>num1>>num2; printSeries(num1,num2); return 0; -} \ No newline at end of file +} From 2561c6543d427289634eb0603ffd9ebb9b3b9c5e Mon Sep 17 00:00:00 2001 From: Mayanksingla139 <55097726+Mayanksingla139@users.noreply.github.com> Date: Fri, 16 Oct 2020 00:20:05 +0530 Subject: [PATCH 04/16] Read me # To check whether a number is in palindrome or not --- C++/program-19 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 C++/program-19 diff --git a/C++/program-19 b/C++/program-19 new file mode 100644 index 00000000..a18f2dd0 --- /dev/null +++ b/C++/program-19 @@ -0,0 +1,23 @@ +#include +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; +} From cca9858568d4bb9932479613bebfce8f5c6fca09 Mon Sep 17 00:00:00 2001 From: Mayanksingla139 <55097726+Mayanksingla139@users.noreply.github.com> Date: Fri, 16 Oct 2020 00:24:12 +0530 Subject: [PATCH 05/16] Delete program-19 --- C++/program-19 | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 C++/program-19 diff --git a/C++/program-19 b/C++/program-19 deleted file mode 100644 index a18f2dd0..00000000 --- a/C++/program-19 +++ /dev/null @@ -1,23 +0,0 @@ -#include -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; -} From e731e4136b853a539adad278267a4fc0d38f688b Mon Sep 17 00:00:00 2001 From: Swasthik Shetty <42874695+swaaz@users.noreply.github.com> Date: Fri, 16 Oct 2020 00:55:17 +0530 Subject: [PATCH 06/16] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 0a5ec0fd..32191b66 100644 --- a/readme.md +++ b/readme.md @@ -115,5 +115,5 @@ ### Tada you just made a contribution โœจ. Pat your back ๐Ÿ‘

-### 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/) From 3dec8861c9de008814e2746d78d11b201cf559f5 Mon Sep 17 00:00:00 2001 From: Mayanksingla139 Date: Fri, 16 Oct 2020 10:16:34 +0530 Subject: [PATCH 07/16] To check whether a number is in palindrome or not --- C++/README.md | 1 + C++/program-19/Read me.md | 1 + C++/program-19/palindrome.cpp | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 C++/program-19/Read me.md create mode 100644 C++/program-19/palindrome.cpp diff --git a/C++/README.md b/C++/README.md index 6c2a8fec..4ffbcb51 100644 --- a/C++/README.md +++ b/C++/README.md @@ -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 \ No newline at end of file diff --git a/C++/program-19/Read me.md b/C++/program-19/Read me.md new file mode 100644 index 00000000..a952e91a --- /dev/null +++ b/C++/program-19/Read me.md @@ -0,0 +1 @@ +# To check whether a number is in palindrome or not \ No newline at end of file diff --git a/C++/program-19/palindrome.cpp b/C++/program-19/palindrome.cpp new file mode 100644 index 00000000..a18f2dd0 --- /dev/null +++ b/C++/program-19/palindrome.cpp @@ -0,0 +1,23 @@ +#include +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; +} From 419d1e126011febaae8ea7a87cc1d030c44c1ead Mon Sep 17 00:00:00 2001 From: Shravya R Shetty <67235369+Shravyarshetty@users.noreply.github.com> Date: Fri, 16 Oct 2020 22:17:07 +0530 Subject: [PATCH 08/16] Update README.md --- Python/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Python/README.md b/Python/README.md index c1b29aee..c5696bfa 100644 --- a/Python/README.md +++ b/Python/README.md @@ -21,4 +21,14 @@ | 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. | \ No newline at end of file +| 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 to sort the array and give the time to sort the array. | +| Program-26 | Program to print a right angled triangle. | +| Program-27 | Program to convert Binary to Decimal. | +| Program-28 | Program to check leap year or not. | +| Program-29 | Program to count number of integers between 1 to 50 divisible by a number. | +| Program-30 | Program to create an array of range specified and print. | From 28a6bac231bc555bcc6a35d6cc9babfd272708f2 Mon Sep 17 00:00:00 2001 From: Shravya R Shetty <67235369+Shravyarshetty@users.noreply.github.com> Date: Fri, 16 Oct 2020 22:24:46 +0530 Subject: [PATCH 09/16] Update README.md --- Python/README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Python/README.md b/Python/README.md index c5696bfa..bc55403d 100644 --- a/Python/README.md +++ b/Python/README.md @@ -26,9 +26,10 @@ | 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 to sort the array and give the time to sort the array. | -| Program-26 | Program to print a right angled triangle. | -| Program-27 | Program to convert Binary to Decimal. | -| Program-28 | Program to check leap year or not. | +| 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 to count number of integers between 1 to 50 divisible by a number. | | Program-30 | Program to create an array of range specified and print. | From 8c2efab50b11f0aacbc0ef4d7752dc371b13dcbf Mon Sep 17 00:00:00 2001 From: Shravya R Shetty <67235369+Shravyarshetty@users.noreply.github.com> Date: Fri, 16 Oct 2020 22:28:07 +0530 Subject: [PATCH 10/16] Update README.md --- Python/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/README.md b/Python/README.md index bc55403d..b171790f 100644 --- a/Python/README.md +++ b/Python/README.md @@ -31,5 +31,5 @@ | 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 to count number of integers between 1 to 50 divisible by a number. | -| Program-30 | Program to create an array of range specified and print. | +| Program-29 | Program which will display the fibonacci series | +| Program-31 | Program to print Amstrong numbers | From b56d4d4a2bdfbdf48cdf9b1d3c986b2eb1216cf9 Mon Sep 17 00:00:00 2001 From: Sitikanta-Panigrahi <60188244+Sitispeaks@users.noreply.github.com> Date: Sat, 17 Oct 2020 14:34:38 +0530 Subject: [PATCH 11/16] Create square_root_using_binary_search.cpp A cpp code to find the square root of a given number using binary search --- .../square_root_using_binary_search.cpp | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 C++/Program-20/square_root_using_binary_search.cpp diff --git a/C++/Program-20/square_root_using_binary_search.cpp b/C++/Program-20/square_root_using_binary_search.cpp new file mode 100644 index 00000000..53f78f47 --- /dev/null +++ b/C++/Program-20/square_root_using_binary_search.cpp @@ -0,0 +1,45 @@ +#include +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< Date: Sat, 17 Oct 2020 14:37:42 +0530 Subject: [PATCH 12/16] Create Readme.md --- C++/Program-20/Readme.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 C++/Program-20/Readme.md diff --git a/C++/Program-20/Readme.md b/C++/Program-20/Readme.md new file mode 100644 index 00000000..31029063 --- /dev/null +++ b/C++/Program-20/Readme.md @@ -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" From 20737567878800b397e99ff58e061b254d1eea7c Mon Sep 17 00:00:00 2001 From: Sitikanta-Panigrahi <60188244+Sitispeaks@users.noreply.github.com> Date: Sat, 17 Oct 2020 14:39:49 +0530 Subject: [PATCH 13/16] Rename square_root_using_binary_search.cpp to program.cpp A cpp program to find the square root of a number upto "p" number of places --- .../{square_root_using_binary_search.cpp => program.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename C++/Program-20/{square_root_using_binary_search.cpp => program.cpp} (100%) diff --git a/C++/Program-20/square_root_using_binary_search.cpp b/C++/Program-20/program.cpp similarity index 100% rename from C++/Program-20/square_root_using_binary_search.cpp rename to C++/Program-20/program.cpp From 136155cc120dbebfb17a8fb89693d909f640b456 Mon Sep 17 00:00:00 2001 From: Sitikanta-Panigrahi <60188244+Sitispeaks@users.noreply.github.com> Date: Sat, 17 Oct 2020 14:43:54 +0530 Subject: [PATCH 14/16] Update and rename Readme.md to README.md --- C++/Program-20/{Readme.md => README.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename C++/Program-20/{Readme.md => README.md} (50%) diff --git a/C++/Program-20/Readme.md b/C++/Program-20/README.md similarity index 50% rename from C++/Program-20/Readme.md rename to C++/Program-20/README.md index 31029063..6a94fd2d 100644 --- a/C++/Program-20/Readme.md +++ b/C++/Program-20/README.md @@ -1,4 +1,4 @@ -To find the square root of a number upto "p" no of places +## 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" From be7900884e65d454e038a4c1ab33207552124814 Mon Sep 17 00:00:00 2001 From: Anju Kumari Date: Sun, 18 Oct 2020 11:59:55 +0530 Subject: [PATCH 15/16] A program in Dart --- Dart/Program1/checkevenodd.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dart/Program1/checkevenodd.dart diff --git a/Dart/Program1/checkevenodd.dart b/Dart/Program1/checkevenodd.dart new file mode 100644 index 00000000..0259ae75 --- /dev/null +++ b/Dart/Program1/checkevenodd.dart @@ -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"); + } +} \ No newline at end of file From b43f37fad83b91712b36c6b61da6a6335ef8f739 Mon Sep 17 00:00:00 2001 From: Anju Kumari <42924677+Anju1415@users.noreply.github.com> Date: Sun, 18 Oct 2020 12:54:07 +0530 Subject: [PATCH 16/16] Create README.md Question Added --- Dart/Program1/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Dart/Program1/README.md diff --git a/Dart/Program1/README.md b/Dart/Program1/README.md new file mode 100644 index 00000000..9d3d8f2b --- /dev/null +++ b/Dart/Program1/README.md @@ -0,0 +1,3 @@ +Q1. Write a program to check given number is even or odd. + +Ask the number from user in variable "number"