Sort by

recency

|

3985 Discussions

|

  • + 0 comments

    The task says:

    The variables i d and s are already declared and initialized for you.

    But this is not true, You'll need to create and initalise them yourself to pass.

    Eg:

    const i: number = 4;
    const d: number = 4.0;
    const s: string = "HackerRank"
    

    `

  • + 0 comments

    This is correct code but still icant figure it out why do we taken that i & d as 4 can anybody** help me **with that .

        int i = 4;
        double d = 4.0;
        String s = "HackerRank ";
    
        Scanner scan = new Scanner(System.in);
    
        int i2 = scan.nextInt();      
        double d2 = scan.nextDouble();
        scan.nextLine();              
        String s2 = scan.nextLine();  
    
    
        System.out.println(i + i2);
        System.out.printf("%.1f\n", d + d2);
        System.out.println(s + s2);
    
        scan.close();
    }
    

    }

  • + 1 comment

    I want to share my solution in Java:

            int i2 = scan.nextInt();
            double d2= scan.nextDouble();
            scan.nextLine();
            String s2= scan.nextLine();
                    
            System.out.println(i + i2);
            System.out.println(d + d2);
            System.out.println(s +s2);
    
  • + 1 comment

    i = 4 d = 4.0 s = 'HackerRank '

    a = int(input()) b = float(input()) c = str(input()) print(i+a) print(d+b) print(s+c)

  • + 0 comments

    How do you solve this challenge? When I submit my code, it remains "unsolved" but it gave me full credit under the submissions tab.