Saturday, May 22, 2010

How to I align code in text editor using miracle c compiler?

I would just like to align my program. During execution. it's perfectly aligned. In text editor, It looks all scattered I have to use the arrow to navigate. I tried doing each line separately with the printf fuction but it wont show during execution.





Here's a sample:





printf ("\n\n\tAdditional currency comparisons:\n\n\t1.00 Kenyan Shilling is 0.01491 U.S. Dollars\n\t1.00 Zimbabwean Dollar is 0.00401 U.S. Dollars\n\t1.00 Euro is 1.194860 U.S. Dollars\n\t1.00 United Kingdom Pound is 1.765740 U.S. Dollars \n\t1.00 Mexican Pesos is 0.087670 U.S. Dollars\n\t1.00 Japanese Yen is 0.008767 U.S. Dollars \n\t1.00 Canadian Dollar is 0.719031 U.S. Dollars");


printf("\n\n Hit enter to exit\t\1");//also adds a happy face \1


getch();//holds information on the screen


}//ends main








Please tell me what I could do to align in text editor. I just want it to look neat. Thank you in advance.

How to I align code in text editor using miracle c compiler?
Try using the "indent" utility. You could also customize your editor so that it does this for you. Make sure you use a "Programmer's Editor" Like Emacs, vi, Crimson Editor or Notepad2 so that it will allow you to customize your preferences.

forsythia

No comments:

Post a Comment