Something To Try

  • Try removing one of the %d sign in printing width and depth.
  • Try introducing extra %d signs.
  • Try making program to calculate a triangle area. The formulae is (length x height)/2.
  • Try using float variable for square.c program we just discussed. To output float variables, use %f instead of %d.
  • Using float variables, try to build a program to calculate a circle area. The formulae is pi x radius x radius, where pi is 3.1415926535.
  • After using %f to output float variables, try using %4.3f instead. What's the difference? Then, try %5.4f. What's the difference?

 


Where to go

Chapter 2
News Page
Lesson 1 contents
Contacting Me


Roby Joehanes © 2001

Hosted by www.Geocities.ws

1