UVa Solution 10696 – f91


The problem link is
 UVa:10696-f91

Difficulty Level : 1.0

Solution:

#include<stdio.h>
int main()
{
    long n;
    while(scanf("%ld",&n)==1)
    {
        if(n==0)
            break;
        else if(n>=101)
            printf("f91(%ld) = %ld",n,n-10);
        else
            printf("f91(%ld) = 91",n);
        printf("\n");
    }
    return 0;
}

Run time: 0.076
User Name on UVA: refatsardar

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: