Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int t,i,n,x,total;
- scanf("%d",&t);
- for(i=1;i<=t;i++){
- scanf("%d",&n);
- total=0;
- while(n--){
- scanf("%d",&x);
- if(x>0)
- total+=x;
- }
- printf("Case %d: %d\n",i,total);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement