Monday 4 January 2016

Solution of LIGHT OJ 1000 :: Greetings from LightOJ


Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.

2 comments:

  1. #include

    int main()
    {
    int t,answer,a,b,i;
    scanf("%d",&t);
    for(i=1;i<=t;i++)
    {
    scanf("%d %d",&a,&b);
    answer=a+b;
    printf("case %d: %d\n",i,answer);
    }

    }
    where is the prblm....why give presantation error?

    ReplyDelete
  2. #include
    int main(){

    int t,c,d,i=1;
    scanf("%d",&t);
    while(t>0){
    scanf("%d %d",&c,&d);
    printf("Case %d: %d",i,c+d);
    i++;
    t--;
    }
    return 0;
    }



    //What is wrong with the code.......... brooooo

    ReplyDelete

Note: only a member of this blog may post a comment.