Tuesday, 19 September 2017

Java Program to find largest digit in the given input and calculate the multiples of the largest digit with all individual digits to single digit

Question:

Program to find largest digit in the given input and calculate the multiples of the largest digit with all individual digits to single digit

Input: 123
Output: Result: 9

Program:

import java.io.*;

public class LetUsCodeinJava{
     public static void main(String[ ] args){
          String inpStr = "123";
          int res = 0, sum = 0;
          int maxDigit = Integer.parseInt(inpStr.charAt(0) + "");
          // to find max digit in the given string
          for(int i = 0; i < inpStr.length( ); i++){
               if(Integer.parseInt(inpStr.charAt(i) + "") > maxDigit){
                    maxDigit = Integer.parseInt(inpStr.charAt(i) + "");
               }
          }
          // multiples of the largest digit with all individual digits
          for(int i = 0; i < inpStr.length( ); i++){
               res += maxDigit * Integer.parseInt(inpStr.charAt(i) + "");
          }
          // sum of digits to single digit
          while(res > 0 || sum > 9){
               if(res == 0){
                     res = sum;
                     sum = 0;
               }
               sum += res % 10;
               res /= 10;
           }
           System.out.println("Result: "sum);
     }
}

Output:

Result: 9

Explanation:

We need to divide the program into 3 section
1. to find max digit in the given string.
2. multiples of the largest digit with all individual digits.
3. sum of resultant digits to single digit.

In the 1st section we will get the largest digit

maxDigit = 3:

In the 2nd section we need to multiply all the digits with maxDigit

so, 1 * 3 = 3, 2 * 3 = 6, 3 * 3 = 9

res = 3 + 6 + 9 = 18

In the 3rd section we are calculating the sum of digits into single digit

so, sum = 1 + 8 = 9

Hence, Result = 9.



Monday, 18 September 2017

Java Program to remove special characters and print sum of the unique numerical characters in the given string


Question:

Program to remove special characters and print sum of print sum of the unique numerical characters in the given string

Input: 123%#$.257
Output: Sum: 18

Program:

import java.io.*;

public class LetUsCodeinC{
     public static void main(String[ ] args){
           String inpStr = "123%#$.257";
           //Removing special characters from the given string
           inpStr = inpStr.replaceAll("[^0-9]","");
           String resStr = "";
           int sum = 0;
           //Removing duplicates from the resStr String
           for(int i = 0; inpStr.length( ); i++){
                if(!resStr.contains(String.valueOf(inpStr.charAt(i)))){
                     resStr += String.valueOf(inpStr.charAt(i));
                }
           }
           //Sum of all the numeric characters of resStr.
           for(int i = 0; resStr.length( ); i++){
                sum += Integer.parseInt(resStr.charAt(i) + "");
           }
           System.out.println("Sum: " + sum);
     }
}

Output:

Sum: 18

Explanation:

First we need to divide this program into 3 modules.
    1. Removing special characters from the given string.
    2. Removing duplicates from the resultant string.
    3. Sum of all the resultant numeric characters of string.




Java Program to remove duplicate characters in the given string


Question:

Program to remove duplicate characters in the given string
Input: 123346778
Output: 12345678

Program:

import java.io.*;

public class LetUsCodeinJava {
      public static void main(String[ ] args){
            String inpStr = "123346778";
            String resStr = "";
            for(int i = 0; i < inpStr.length( ); i++){
                 if(!resStr.contains(String.valueOf(inpStr.charAt(i)))){
                       resStr += String.valueOf(inpStr.charAt(i));
                 }
            }
            System.out.println(resStr);
      }
}

Output:

12345678



Java Program to remove special characters in the given String


Question:

Program to remove special characters in the given string
Input: 1746%$10.
Output: 174610

Program:

import java.io.*;
public class LetUsCodeinJava{
      public static void main(String[ ] args){
           String inpStr = "1746%$10.";
           inpStr = inpStr.replaceAll("[^0-9]","");
           System.out.println(inpStr);
      }
}

Output:

174610

Explanation:

In Java we have replaceAll( ) method to replace the sequence of matching characters with the matching regular expression and we can replace the string with whatever string.

  Syntax:-

  public String replaceAll(String regExpression, String repString)




Saturday, 5 August 2017

Here is the trick to activate amazon prime membership for lifetime[100% Working]


amazon is the one of the leading and big online shopping website. Even if it is leading or big online shopping website, it may have some sort of loop holes or small hacks. Now I am going to explain one simple trick like how to activate amazon prime account for free. Just follow the below simple steps.

Step 1: Login to your amazon account.

Step 2: Now navigate to the amazon prime membership tab, as you can see in the below screenshot.


Step 3: Now click on the Join Prime, after that you will navigate to the following amazon prime webpage.

Step 4: Now click on the Join Prime today, after that you will navigate to the payment webpage.

Step 5: Here you go, Now select Net Banking as a payment method and HDFC/AXIS/ICICI


Step 6: Now click on the Continue without any doubt, after that you will navigate to billing address webpage.

Step 7: Now select respective  address or add a new address.

Step 8: Now you will be in Review your order page. Click on Place Your Order and Pay.

Step 9: Now you will navigate to the respective selected Bank Website.

Step 10: Now close the current page and open amazon website and check. 


That's it. Now you are an amazon prime user.

Enjoy unlimited fast delivery, Instant video streaming and earl access for exclusive deals.

Note:
This trick only work till 24hrs. After that again follow the same procedure.


See more:





Thursday, 27 July 2017

Here is an awesome trick to use WhatsApp as a Search Engine[100% Working]

            Here is an amazing WhatsApp trick to access Wikipedia in the WhatsApp, Just follow the below steps to access Wikipedia in your WhatsApp.
Step 1: Save anyone of these numbers +919043017568 or +918015776749 as Wikipedia or Wiki in your mobile contact list.

Step 2: Now, Create a WhatsApp group and name it as Wikipedia or whatever your familiar name like My Notes, Search Engine, WhatsApp Bot... etc.

Step 3: After successfully creating the group, add those contact in this group as a participant.
WhatsApp Group(My Notes) -> Add participant


Step 4: Here you go, Now type queries and it will give the information in the fraction of seconds.

Example 1: just type Weather Bangalore

It will give the latest weather forecasting data as you can see in the below picture.



Example 2: Wiki India

It will give the brief information about India.


Example 3: Train 12712

It will track the given train(12712) and give the current running train details.


You can use it as a search engine also. It will give instant result.

Note:

    This awesome service is not provided by WhatsApp. It is provided by the group messenger Duta. for more information you can visit duta.in




Saturday, 17 June 2017

Syntel Off Campus Recruitment Drive for Freshers


Company Overview:

Syntel is one the U.S based multinational company. It is a leading global provider of integrated technology and business services.

Headquarters Troy, Michigan, USA.
CEO & President Rakesh Khanna
Chairman & Co-Founder Bharat Desai
Co-Chairman Prashant Ranade.
Employees >22,000
Revenues >$966.6 million(aprox.)


Job Description:

Min. Pre-requisites:

B.Tech/B.E/MCA/MSC/BSC/BCA/BCS/Diploma/B.Com 2016 Graduates

Graduates:

B.Tech/B.E - Computer Science / Information Technology

MCA - Computers/Information Technology.

MSC - Computer Science/In Technology/Statistics/Mathematics.

Diploma - Computer Science/Information Technology

B.Com - Information Technology

Percentage:  Min. 60% in Xth, XIIth, Graduation  and Post-Graduation.

Job Location: Chennai/Mumbai/Pune

Note:
Candidate should not have any backlogs and maximum of 1 year break in entire education.




Apply Now: Registration Form




Wednesday, 31 May 2017

Essential PH-1 Smartphone Specifications


Andy Rubin is one of the creators of the Android software. Recently he has launched his own smartphone called "Essential".

In 2014, Andy Rubin created a technology investment company named as Playground. Essential is one of the companies it funds and Essential Smartphone is their first product.


Essential PH-1 Specifications

Network GSM - Band (2 / 3 / 5 / 8); WCDMA - Band (1 / 2 / 5 /8); LTE (FDD) - Band (1 / 3 / 5 / 7 / 8 / 20)
Announced May, 2017
Dimensions 141.5 x 71.1 x 7.8 mm (5.57 x 2.80 x 0.31 in)
Weight 185 g (6.53 oz)
SIM Dual SIM (Nano-SIM, dual stand-by)
Display Type LTPS IPS LCD capacitive touchscreen, 16M colors, Corning Gorilla Glass 5
Display Size 5.71 inches
Operating System Android 7.1
Processor Type Qualcomm MSM8998 Snapdragon 835
Processor Core Octa Core
Processor Clock Speed 1.9GHz
Internal Storage 128 GB
RAM Memory 4 GB
Primary Camera Dual 13 MP, f/1.9, phase detection & laser autofocus, LED flash, touch focus, face detection, HDR, panorama
Secondary Camera 8 MP, f/2.2, 2160p@30fps, 1080p@60fps, 720p@120fps
3.5mm audio Jack No
GPS Yes, with A-GPS, GLONASS
Bluetooth 5.0, A2DP, EDR, LE
Radio No
Fingerprint Sensor Yes
Other Sensors accelerometer, gyro, proximity, compass, barometer
Battery Type Non-removable Li-Ion 3040 mAh battery

Tuesday, 14 March 2017

Java Program on String Manipulations




Write a JAVA program to print following output?

Input Format:

tech prompt

Output Format:

TECH PROMPT
Tech Prompt

Program:

import java.io.*;
import java.lang.*;
public class Test{
   public static void main(String args[ ]){
      String inp = "tech prompt";
      String a[ ] = inp.split(" ");
      System.out.println(inp.toUpperCase( ));
      for(int i = 0;i <  a.length;i++){
            String str = a[i];
            System.out.print((str.substring(0,1).toUpperCase( ) + str.substring(1, str.length( )));
      }
   }
}












Monday, 13 March 2017

Your account is temporarily blocked for login Paytm account


                               Paytm is one of the india's largest payment and e-commerce company. Paytm was founded by One97 Communications in 2010 for mobile recharges. It started with online mobile recharge and bill payments. Now a days most of the people are using Paytm wallet for online trasactions, like sending paytm wallet money to other banks in easy way. For faster online transactions users can add money to the paytm wallet. Sometimes we forgot our Paytm password to login. If you entered wrong password morethan 3 times or if Paytm identified any fault transaction from our account, account will be temporarily blocked.



The following steps help you to unblock Paytm account.

1) Open your Paytm registered mail account.

2) Drop a mail to care@paytm.com or  cybercell@paytm.com



3) After sending mail to paytm, you will get autogenerated  mail from paytm like your ticket logged.

4) After that they will ask some proofs like bank statement for unblocking your paytm account.