I just removed float a and float b initialisation from the main function and put it above it, causing it to become a global variable.
code:
#include <stdio.h>
#include <conio.h>
float a;
float b;
void main(void)
{
clrscr();
scanf("%f%f", &a,&b);
printf("%f \n %f", a,b);
}