Thursday, September 17, 2015

UVA-12577 (Hajj-e-Akbar) EASY Using Java

UVA-12577 (Hajj-e-Akbar) EASY

0001_thumb[6]

Capture_thumb[2]

 

import java.util.Scanner;
public class Main{
 
    public static void main(String[] args) {
        String a=new String();
        int i=1;
        Scanner s=new Scanner(System.in);
         while((a=s.nextLine()) != null)
            {
             if(a.charAt(0)=='*')
                   break;
             else if(a.equals("Hajj"))
             {
                 System.out.println("Case "+i+":"+" Hajj-e-Akbar");
             }
             else if (a.equals("Umrah")) {
                 System.out.println("Case "+i+":"+" Hajj-e-Asghar");
            }
             i++;
            }
 
    }
 
}

No comments:

Post a Comment