WAP to convert meters into kilometers and meters.
Getting an error "Illegal use of floating point" Please help me.Code:#include<stdio.h> #include<conio.h> void main () { float ms,kms,tms; printf("Enter the total number of meters"); scanf("%f",&tms); kms=tms/1000; ms=tms%1000; printf("The total number of kilometers and meters are %f kms %f ms",kms,ms); getch(); }