12577 - Hajj-e-Akbar

All about problems in Volume 125. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
sagittarius
New poster
Posts: 1
Joined: Sat Jun 13, 2015 8:25 pm

Compilation Error(Uva 12577)

Post by sagittarius » Sat Jun 13, 2015 8:34 pm

I am getting compilation error in problem number 12577.I am new with java in uva.
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++;
		}
	}
}
I need help..someone please help me...

Post Reply

Return to “Volume 125 (12500-12599)”