Posts

Showing posts with the label Skillrack

Expansion of String-Skillrack

Image
JAVA Solution import java.util.*; public class Hello {     public static void main(String[] args) {         Scanner s = new Scanner(System.in);         String str = s.next();         int len = str.length()-1;         while(len>=0)         {             System.out.print(str.substring(len));             len--;         }     } }

Count of Punctuation-Skillrack

Image
Java Solution

Concatenate and Check Perfect Square-Skillrack

Image
  JAVA Solution import java.util.*; public class Hello {     public static void main(String[] args) {         Scanner s = new Scanner(System.in);         String s1 = s.next(), s2 = s.next();         String s3 = s1+s2, s4 = s2+s1;         int x = Integer.parseInt(s3), y = Integer.parseInt(s4);         double x1 = Math.sqrt(x);         if((x1 -Math.floor(x1))==0)         {             System.out.print("Yes");             return;         }         else         {         double x2 = Math.sqrt(y);         if((x2-Math.floor(x2))==0)         System.out.print("Yes");         else         System.out.print("No");         }     } } Happy Programming...!!!