Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
Catalan numbers in java
The nth Catalan number in terms of binomial coefficients is calculated by the formula(n + k )/k where k varies from 2 to n and n ≥ 0. i.e.Cn = (2n)!/((n+1)!n!)Programpublic class CatalanNumbers { public static long fact(int i) { if(i
Read MoreSmith Numbers in java
A composite number whose sum of digits equal to the sum of the digits of its prime factors.Ex: 58 = 2 x 29 (5 + 8 = 12) (2+ 2 + 9 = 12)Programpublic class SmithNumbers { public static boolean isPrime(int number) { int loop; int prime = 1; for(loop = 2; loop < number; loop++) { if((number % loop) == 0) { prime = 0; } } if (prime ...
Read Morek-th prime factor of a given number in java
Following is the Java program which prints the kth prime factor of a number n, when k and n are given.Programimport java.util.Scanner; public class KthPrimeFactor { public static void main(String args[]) { int number, k, factor = 0; Scanner sc = new Scanner(System.in); System.out.println("Enter a number :"); number = sc.nextInt(); System.out.println("Enter the k value :"); k = sc.nextInt(); int temp = k-1; for(int i = 2; i< number; ...
Read MoreWhat is the easiest way to transfer files from phone to PC?
This question occurs in our minds when we have to transfer files and all old methods start giving us enough troubles. The one way is to synchronize your phone with the USB cable, but you cannot carry the cable everywhere. You can transfer your data through email or other conventional methods, but again these tricks come with a lot of mess. However, you can get this done through some easy tools mentioned here:Push BulletYou can connect your phone and PC completely with the help of this tool, which also gives you a feeling that both your device and PC are ...
Read MoreFind politeness of a number in java
The numbers which can be expressed as the sum of positive consecutive integers are known as polite numbers.Ex: 5 = 2+3The number of ways a number can be expressed as the sum of positive integers will be the Politeness of that number.Ex: 9 = 4+5 || 2+3+4AlgorithmGet the prime factors of a number.Get the powers of prime factors greater than 2.Add 1 to all of them.Multiply them, subtract 1 from the result.Programimport java.util.Scanner; public class PolitenessOfANumber { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Enter a number"); ...
Read MoreFind all divisors of a natural number in java
Following is the Java program which prints all the divisors of a given number.Programimport java.util.Scanner; public class DivisorsOfNaturalNumber { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Enter required number :"); int num = sc.nextInt(); for(int i = 1; i
Read MoreWhat are some helpful English phrases that can improve my English?
A language can be easily learned by attempting the use of the things you see around, especially the phrases, which can help you improve your written as well as spoken English. The following Idioms belong to the word 'Blue’. Take a look!Blue-Sky (Fictitious)Usage − Blue sky thinking will yield nothing.Bluestocking (A Wise and Educated Lady)Usage − A bluestocking like her is not approved of by some men.Make Me Blue(Depressed, Melancholy)Usage − That music always makes me blue.Blue Jokes(Obscene, Vulgar, Dirty.)Those blue jokes don’t go over very well around here.Out of the Blue(The Sky, The Heavens)The idea came to me right out ...
Read MoreWhat is the most interesting thing you have come across today?
I am a huge movie-buff and digging out casual info about cinema and celebrities is something I love to do in my leisure. Today, as soon as I hit my phone in a casual mood, and googled how Kamal Hasan’s latest release is doing at the box office, I clapped eyes on a very interesting fact, which will be easy for you to understand after checking out this image.Now, you see right below the name Kamal Haasan, Indian Politician is mentioned. I don’t know but this fell on me as a sheer surprise. Many folks including me consider him (and ...
Read MoreCheck if a large number is divisible by 3 or not in java
If the sum of the digits of a number is divisible by 3, then the number is divisible by 3.Some examples of numbers divisible by 3 are as follows.The number 85203 is divisible by 3 because the sum of its digits (8 + 5 + 2 + 0 + 3 = 18) is divisible by 3.The number 79154 is not divisible by 3 because the sum of its digits (7 + 9 + 1 + 5 + 4 = 26) is not divisible by 3.Programimport java.util.Scanner; public class DivisibleBy3 { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.println("Enter a number :"); String num = sc.nextLine(); int digitSum = 0; for(int i = 0; i
Read MoreWhat are some social media terms I need to know now?
Chatbots − Little bots can answer questions and give information based on queries in natural written language. It is also possible to place orders with them. Many companies already use chatbots. Among them are Uber, Sephora, KLM, and Whole Foods.Microblogging − Short message postings from a social media account. Facebook statuses and Twitter posts are two examples.Tweeps − Twitter + People = Tweople. Twitterati is also used for Twitter users.Meme − A means of taking viral concepts and making them everyday lingo.User-Generated-Content (UGC) − An article describes UGC as being Latin for "crap" which is, quite frankly, well-put. UGC is ...
Read More