Saturday, December 30, 2017

UVA-12577 (Hajj-e-Akbar) EASY

UVA-12577 (Very Easy)
0001 Capture
//12577 - Hajj-e-Akbar.c
#include<stdio.h>
int main()
{
    char c[10];
    int i=1;

    while(gets(c))
    {
       if(c[0]=='*')
           break;
       else if(strcmp(c,"Hajj" )==0)
        printf ("Case %d: Hajj-e-Akbar\n",i);
       else if(strcmp(c,"Umrah" )==0)
        printf ("Case %d: Hajj-e-Asghar\n",i);
    i++;
    }
return 0;
}
UVA-12577  link

No comments:

Post a Comment