Search found 2 matches

by tamal_5th_gen
Wed Nov 18, 2015 7:30 am
Forum: Volume 117 (11700-11799)
Topic: 11764 - Jumping Mario
Replies: 2
Views: 3443

Re: 11764 - Jumping Mario

please help me find out the problem in this code #include<iostream> using namespace std; int main() { int t,k; cin>>t; for(k=1; k<=t; k++) { int n,up=0,down=0; cin>>n; if(n!=0) { int i,h[n-1]; for(i=0; i<n; i++) { cin>>h[i]; } if(n<=1) { cout<<"case "<<k<<": "<<up<<" "<<down<<endl; } else { for(i=0;...
by tamal_5th_gen
Tue Nov 17, 2015 5:57 pm
Forum: Volume 117 (11700-11799)
Topic: 11727 - Cost Cutting
Replies: 7
Views: 2635

Re: 11727 - Cost Cutting

what is the problem in this code :( #include<iostream> using namespace std; int main() { int a,b,c,t,i; cin>>t; for(i=0; i<t; i++) { int mid; cin>>a>>b>>c; if(a>b) { if(a>c) { if(b>c) { mid=b; } else { mid=c; } } else { mid=a; } } else { if(b>c) { if(c>a) { mid=c; } else { mid=a; } } else { mid=b; }...

Go to advanced search