Thursday, 26 April 2018

uva problem 12577 Hajj-e-Akbar solution

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     char str[10];
  6.     int i=1;
  7.     while(cin>>str){
  8.         if(str[0]=='*') break;
  9.         if(strcmp(str,"Hajj")==0) 
  10.              cout<<"Case "<<i++<<": Hajj-e-Akbar"<<endl;
  11.         else 
  12.              cout<<"Case "<<i++<<": Hajj-e-Asghar"<<endl;
  13.  
  14.     }
  15.     return 0;
  16. }

No comments:

Post a Comment

variable declaration of c program

#include <stdbool.h> #include<bits/stdc++.h> #include <stdio.h> #include <string.h> #include <std...