Loan calculator in C
There are a few things to note here. There is extensive referencing and dereferencing of variable addresses, which makes the code less clear. For example, float *x,y; x = &amp;i; y = 1 + *x;.  This is unnecessary and seems imposed by thinking related to your use of global variables. 

There is nothing wrong with passing pointers as arguments to functions, rather than using global variables. 

There is also nothing wrong with using functions. The code below is clearer. Additionally, it removes the need for the function "annualRate," as that is simply a division. 

#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt; 
#include&lt;math.h&gt;

void loanDetails(float * loanAmount, int * years, float* interestRate);
float discount(int years, float i);



int main (void) {
    float loanAmount, interestRate, disc;
    int years;

    loanDetails(&amp;loanAmount, &amp;years, &amp;interestRate);
    disc = discount(years, interestRate/1200);

    printf("\nthe value of discount is : %f",disc);


    printf("\nthe monthly loan payment is %f",loanAmount/disc);
    return EXIT_SUCCESS;
}

void loanDetails(float * loanAmount, int * years, float* interestRate) {
    printf("please enter Total Loan Amount: ");
    scanf("%f",loanAmount);
    printf("please enter the number of years: ");
    scanf("%d",years);
    printf("please enter the annualrate to be applied: ");
    scanf("%f",interestRate);
}
float discount(int years, float i) {
    int months = years*12;
    return (pow((1+i),months)-1)/((i)*pow((1+i),months));
}


If you wanted no functions other than main, you could do the following. Essentially, move the code from the functions to main. This is appropriste, considering that the code is not repeated, runs sequentially, and does not have varied/multiple inputs. 

#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt; 
#include&lt;math.h&gt;


int main (void) {
    float loanAmount, interestRate, disc, i;
    int years, months;

    printf("please enter Total Loan Amount: ");
    scanf("%f",&amp;loanAmount);
    printf("please enter the number of years: ");
    scanf("%d",&amp;years);
    printf("please enter the annualrate to be applied: ");
    scanf("%f",&amp;interestRate);

    months = years*12;
    i = interestRate/1200;

    disc = (pow((1+i),months)-1)/((i)*pow((1+i),months));

    printf("\nthe value of discount is : %f",disc);

    printf("\nthe monthly loan payment is %f",loanAmount/disc);
    return EXIT_SUCCESS;
}