Uva 11597 – Spanning Subtree

Problem:- http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2644

Solution :-

#include<stdio.h>
int main()
{
    int a,i=1;
    while(scanf(“%d”,&a)==1 && a>1)
    {
        printf(“Case %d: %dn”,i,a/2);
        i++;
    }
    return 0;
}
At First you can try to solve this problem if you can’t than see this code & find what’s your problem . If you copy paste this code you could not improve yourself in programming .

Posted by Shipu Ahamed

Leave a Reply