import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
    // System.out.println("Hello world!");
        
    
    /*--------------------------------------------------------------------------------------------
        
        //Day 6 - Beginner: Data Types + Reading Input 1                                          
        
    **  Q 1. Q1. Remaining Bake Time

    **  Problem Description:
        You're going to write some code to help you cook a gorgeous lasagna from your favorite cookbook. 
        According to your cookbook, the Lasagna should be in the oven for 40 minutes. 
        Given the time (in minutes), the lasagna has been in the oven, 
        find how many more minutes the lasagna still needs to bake for.
        
    **  Problem Constraints
        0 <= N <= 40
        
    **  Input Format
        The only first line contains the integer N, 
        denoting the actual time (in minutes) the lasagna has been in the oven for.
        
    **  Output Format
        Print in a single line how many minutes the lasagna needs to bake.
        
    
        --------------------------------------------------------------------------------------------*/
    /*
    
    ** //Solution
    
        Scanner TTS = new Scanner(System.in);

         int TTFB = 40;

        int NOMAS = TTS.nextInt();
        int NOMRFB = TTFB - NOMAS;

        System.out.println(NOMRFB); 
    */
        
    /*  ---------------------------------------Alternate Way Of Doing It:-----------------------------
    
        
    
        Scanner TTS = new Scanner(System.in);
    //  TTS - Total Time Spent in baking so far 

        int TTFB = 40;
    //  TTFB - Total Time For Baking

        int NOMAS = TTS.nextInt();
    //  Number of Minutes already spent in baking
        
        int NOMRFB = TTFB - NOMAS;
    //  Number of Minutes remaining for baking

        System.out.println("Total Time Taken For Baking: " + TTFB);
        System.out.println("Total Time already spent on baking: " + NOMAS);
        System.out.println("Total Time Remaining for baking: " + NOMRFB);
        
    -------------------------------------------------------------------------------------------- */
    
    // Next Question
    
    /*--------------------------------------------------------------------------------------------    
        
    **  Q2. Preparation Time
 

    **  Problem Description:
        You'll write some code to help you cook a gorgeous lasagna from your favorite cookbook. 
        Now, you also want to add a few layers to the lasagna. 
        Assume **each layer takes 2 minutes** to prepare. 
        Given the number of layers you want to add to the lasagna, 
        find how many minutes you would spend making them.
        
    **  Input Format
        The only first line contains the integer N denoting the number of layers.
        
    **  Output Format
        Print in a single line how many minutes are required to prepare N layers.
        
    
        --------------------------------------------------------------------------------------------*/
        
        /*------------------------------------------------------------------------------------------*/
    
        Scanner LTBA = new Scanner(System.in);

        int TTFB = 40;
        
        // TTFB - Total Time for baking
        
        int TTFBEL = 2;
        
        // TTFBEL - Total Time For Baking Extra layer

        int NOLTBA = LTBA.nextInt();
        // NOLTBA - No. of layers to be added / LTBA - Layers to be added
        
        System.out.println(TTFB + TTFBEL*NOLTBA);
    
        --------------------------------------------------------------------------------------------*/
    
        Scanner LTBA = new Scanner(System.in);

        int TTFB = 40 + " Mins" ;
        
        // TTFB - Total Time for baking
        
        int TTFBEL = 2 + " Mins";
    
        // TTFBEL - Total Time For Baking Extra layer

        int NOLTBA = LTBA.nextInt();
        // NOLTBA - No. of layers to be added / LTBA - Layers to be added
        
        System.out.println(TTFB + TTFBEL*NOLTBA);

        System.out.println("Total Time Taken For Baking: " + TTFB);
        System.out.println("Total Time already spent on baking: " + NOMAS);
        System.out.println("Total Time Remaining for baking: " + NOMRFB); 
        
    /*-------------------------------------------------------------------------------------------- */
    /*-------------------------------------------------------------------------------------------- */
    // Next Question
    
    
        
//  **  Q3.
        
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: