4. Reynolds number is calculated using formula (D*v*rho)/mu Where D = Diameter, V= velocity, rho = density mu = viscosity Write a program that will accept all values in appropriate units (Don't worry about unit conversion) If number is < 2100, display Laminar flow, If it's between 2100 and 4000 display 'Transient flow' and if more than '4000', display 'Turbulent Flow' (If, else, then...)
5. Modify the above program such that it will ask for 'Do you want to calculate again (y/n), if you say 'y', it'll again ask the parameters. If 'n', it'll exit. (Do while loop)
While running the program give value mu = 0. See what happens. Does it give 'DIVIDE BY ZERO' error? Does it give 'Segmentation fault..core dump?'. How to handle this situation. Is there something built in the language itself? (Exception Handling)
posted by dharh 3:01 AM Nov 29th, 2009
3. Accepting series of numbers, strings from keyboard and sorting them ascending, descending order.
posted by dharh 1:40 AM Nov 29th, 2009
2. Fibonacci series, swapping two variables, finding maximum/minimum among a list of numbers.
posted by dharh 12:47 AM Nov 29th, 2009
1. Display series of numbers (1,2,3,4, 5....etc) in an infinite loop. The program should quit if someone hits a specific key (Say ESCAPE key).
posted by dharh 7:13 PM Feb 10th, 2008
Part of the passion in my life, besides life itself, is programming and computers. I especially like the idea of smart computing through smart programs and smart OSes. Which is what I want to focus on in my career, creating intelligence to various degrees to help create better and more efficient user experiences using computers.
Bellow is a table of various code snippets and articles organized by language.
15 Exercises for Learning a new Programming LanguageThis is an exercise to both learn a language, but also to compare different languages. The original idea can be found here.
posted by dharh 2:06 PM Mar 15th, 2006
« Previous 1 2