Java Stdin and Stdout I

Sort by

recency

|

584 Discussions

|

  • + 0 comments

    import java.util.*;

    public class Solution {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int  b=scan.nextInt();
        int a = scan.nextInt();
        int c = scan.nextInt();
    
        System.out.println(b+"\n"+a+"\n"+c);
    }
    

    }

  • + 0 comments

    Absolutely! Understanding how to work with standard input and output is crucial for solving HackerRank challenges effectively. Gurubhai247 Login ID and Password

  • + 0 comments

    import java.util.*;

    public class Solution {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNextLine()){
            int a = scan.nextInt();
            System.out.println(a);
        }
        scan.close();
    }
    

    }

  • + 0 comments

    import java.util.*;

    public class Solution {

    public static void main(String[] args) {
            Scanner scan = new Scanner(System.in);
            int a = scan.nextInt();
            int b = scan.nextInt();
            int c = scan.nextInt();
    
            System.out.println(a);
            System.out.println(b);
            System.out.println(c);
    }
    

    }

  • + 0 comments

    Java is such a versatile and powerful programming language! महादेव बुक आईडी