习题2.1

#include<stdio.h>

int main(void)

{

         int num1,num2,sum,difference,product,quotient,remainder;

         printf("Enter num1:");

         scanf("%d",&num1);

         printf("Enter num2:");

         scanf("%d",&num2);

        

         sum=difference=product=quotient=remainder=0;                   

 

 

         sum=num1+num2;

         difference=num1-num2;

         product=num1*num2;

         quotient=num1/num2;

         remainder=num1%num2;

 

         printf("%d,%d,%d,%d,%d",sum,difference,product,quotient,remainder);

 

         return 0;

}

posted @ 2013-10-16 22:56  zhaoyang16  阅读(86)  评论(0编辑  收藏  举报