dharmil007
Journeyman
HeLLo i m new to C & trying to learn it.
i Wrote a programme but when it runs it givese the values as GARBAGE values.
i Dont know why ??
So can pls anybody gimme a solution
i Wrote a programme but when it runs it givese the values as GARBAGE values.
i Dont know why ??
So can pls anybody gimme a solution
PHP:
/*The distance between 2 cities {in km.} is input through
the Keyboard.WAP to convert & print thsi distance in meters,
feets, inches & centimeters*/
#include <stdio.h>
#include <conio.h>
void main ()
{
float cm, km, ft, inch, mtr;
clrscr ();
printf ("\nEnter Distance {in km} between 2 cities\n");
scanf ("\n%f", &km);
printf ("\nThe distance between 2 cities is %fkm",km);
mtr = 1000.0*km;
ft = 3280.8399*km;
cm = 100000.0*km;
inch = 39370.0787*km;
printf ("\nThe Convertsion of km to diff units\nMETER = %f\nFEET = %f\nCentiMeter = %f\niNChEs = %f", &mtr, &ft, &cm, &inch);
getch ();
}