#include <stdio.h>
#include <stdlib.h>
//可变参数求和 
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int sum(int count,...)
{
	int* pt = &count +1;
	int i = 0;
	int ret = 0;
	for(i=0;i<count;i++)
	{
		ret += *pt++;
	}
	return ret;
}
int main(int argc, char *argv[]) 
{
	printf("Sum = %d\n",sum(10,1,2,3,4,5,6,7,8,9,10));
	return 0;
}
                  
                  
                  
                  
                            
      
          
                
                
                
                
              
                
                
                
                
                
              
                
                
              
            
                  
					1984
					
被折叠的  条评论
		 为什么被折叠?
		 
		 
		
    
  
    
  
            


            