Sort by

recency

|

12 Discussions

|

  • + 0 comments

    my Solution to this code will be

            int profit=(b+s)-c;
            return profit;
    
  • + 0 comments

    very simple....

    static int profit(int b, int s, int c) {
            return (b+s)-c;
        }
    
  • + 0 comments

    int profit(int a, int b, int c) { int z,y; z=(c-a); y=(b-z); return y; }

  • + 0 comments

    include

    include

    include

    include

    include

    include

    include

    int profit(int a, int b, int c) { int z,y; z=(c-a); y=(b-z); return y; }

    int main() { int n,a,b,c,i,result=0; scanf("%d", &n); if(n<=100 && n>0) { for(i = 0; i < n; i++) { result=0; scanf("%d%d%d",&a,&b,&c); if(a>1 && b>1 && c>2 && a

  • + 0 comments

    simple, but trickey...