WAP for addition,subtraction,multiplication,division & mod using 5 different functions.



Comments

  1. #include
    void shashi1();
    void shashi2();
    void shashi3();
    void shashi4();
    void shashi5();
    void main()
    {
    shashi1();
    shashi2();
    shashi3();
    shashi4();
    shashi5();
    }
    void shashi1()
    {
    int a,b,c;
    printf("enter value\n");
    scanf("%d%d",&a,&b);
    c=a+b;
    printf("addition is%d\n",c);
    }
    void shashi2()
    {
    int a,b,c;
    printf("enter value\n");
    scanf("%d%d",&a,&b);
    c=a-b;
    printf("substraction is%d\n",c);
    }
    void shashi3()
    {
    int a,b,c;
    printf("enter value\n");
    scanf("%d%d",&a,&b);
    c=a*b;
    printf("multiplication is%d\n",c);
    }
    void shashi4()
    {
    int a,b;
    float c;
    printf("enter value\n");
    scanf("%d%d",&a,&b);
    c=a/b;
    printf("division is%f\n",c);
    }
    void shashi5()
    {
    int a,b,c;
    printf("enter value\n");
    scanf("%d%d",&a,&b);
    c=a%b;
    printf("mod is %d\n",c);

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

Post a Comment