Here is my code:
Code: Select all
import java.io.*;
public class HajjeAkbar{
public static void main(String args[]) throws IOException{
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
String str="";
int coutn=1;
while(!(str=br.readLine()).equals("*")){
if(str.equals("Hajj")){
System.out.println("Case "+coutn+": Hajj-e-Akbar");
}else{
System.out.println("Case "+coutn+": Hajj-e-Asghar");
}
coutn++;
}
}
}