Given 3 integers performing a math operation each. Input any integer and perform its task without using comparison statements.
Given three integers say 10,20 and 30 each intended to perform a math operation.write a C program to input any one integer and perform its task without using comparison statements.

In the program below, I have used integer pointers and assigned the all values and checking for all integers and performing its respective operation. when trying to think to input one integer and perform its task i am ending up in using one/other comparison statement like for,if-else,switch to do its respective task i.e.

 if input==10 then do A() etc.

logic to figure this out will do. code is appreciated.

I am thinking on pointer based concepts to track down program.

logic to figure this out will do. code is appreciated. Thanks.  

    main()
    {
    int *i,n;
    i = &n;
    *i=10; 
    addition();
    *i = 20; 
    multi();
    *i = 30;
    subtract();
    }

    int a=6,b=4,c;
    addition()
    {
    c = a + b;
    printf("\n c = %d", c);
    }
    multi()
    {
    c = a * b;
    printf("\n c = %d", c);
    }
    subtract()
    {
    c = a - b;
    printf("\n c = %d", c);
    }
Given 3 integers performing a math operation each. Input any integer and perform its task without using comparison statements.
===

Given three integers say 10,20 and 30 each intended to perform a math operation.write a C program to input any one integer and perform its task without using comparison statements.

In the program below, I have used integer pointers and assigned the all values and checking for all integers and performing its respective operation. when trying to think to input one integer and perform its task i am ending up in using one/other comparison statement like for,if-else,switch to do its respective task i.e.

 if input==10 then do A() etc.

logic to figure this out will do. code is appreciated.

I am thinking on pointer based concepts to track down program.

logic to figure this out will do. code is appreciated. Thanks.  

    main()
    {
    int *i,n;
    i = &n;
    *i=10; 
    addition();
    *i = 20; 
    multi();
    *i = 30;
    subtract();
    }

    int a=6,b=4,c;
    addition()
    {
    c = a + b;
    printf("\n c = %d", c);
    }
    multi()
    {
    c = a * b;
    printf("\n c = %d", c);
    }
    subtract()
    {
    c = a - b;
    printf("\n c = %d", c);
    }