Advertisement
prashandip

Java Test Template

Nov 19th, 2021
1,266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class MyTest {
  4.  
  5.    //Do not edit the main function
  6.    public static void main(String[] args) {
  7.      
  8.        int input;
  9.  
  10.        //Get the input
  11.        Scanner scanner = new Scanner(System.in);
  12.        input = scanner.nextInt();
  13.  
  14.        //Print output returned from the logic function
  15.        System.out.println(logic(input));
  16.    }
  17.  
  18.  
  19.    //The function is expected to return an integer.
  20.    //The function accepts an integer as parameter.
  21.    public static int logic(int input){
  22.        //Write your code here
  23.        //You can create other functions and call from here
  24.        //Don't print anything. Just return the intended output
  25.  
  26.    }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement