Fee

.

.

.

.

HeyCloud Internship Program – read the below code !!

import java.util.Scanner;
public class InterviewFee {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Did you pass the interview? (yes/no)");
        String interviewResult = scanner.next();
        int fee = calculateFee(interviewResult);
        System.out.println("Your fee is: ₹" + fee);
    }
    private static int calculateFee(String interviewResult) {
        if (interviewResult.equalsIgnoreCase("yes")) {
            return 0; // Passed interview, no fee
        } else {
            return 4999; // Failed interview, ₹4999
        }
    }
}



© Copyright 2024, All rights reserved by HeyCloud Innovations LLP | designed by ColorWhistle | Privacy Policy | Terms and Conditions