You've got several code problems and a posting problem. For the posting problem, read the "Before you make a query" thread and learn to put your code in tags to preserve its indentation/formatting. If you don't, we're not likely to read your future posts.

Now for the code: You have to give the variables you've declared a value. Declared inside main, they're local and will just contain junk until you assign a value to them. If you declare them globally, most compilers (not all) will initialize them to zero. You should still assign them a value of your own before printing them.

As for the printing, %d means int. %d will not print a float or a char properly. Use %f for floats, %c for chars. There are other formatting symbols for other types. Read the documentation on printf before you use it, for God's sake.