Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(){
- int i, j, x=0;
- for(i=1;i<5;++i)
- for(j=0;i<j;++j){
- switch(i+j-1){
- case -1:
- case 0:
- x+=1;
- break;
- case 1:
- case 2:
- case 3:
- x+=2;
- default:
- x+=3;
- }
- printf("%d",x);
- }
- printf("nx=%d",x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement