CS 150 Introduction to C++ Programming - Spring 1998 

[ Home | Lecture Notes| WebTutor | WebTutor Site Map]


C++ Syntax and Semantics

Legal Expressions


3. Mark the following expressions as either legal or illegal,
Indicate whether the value is an integer or a floating point value. (from exercise 5. p89)

  Valid Invalid   integer floating point
10 + 3  
-9.4 - 6.2  
10.0 / 3.0  
10 / 3  
10 % 3  
10.0 % 3.0  
4 / 8  
Choose one when done
   

Copyright chris wild 1998.
For problems or questions regarding this web contact [Dr. Wild (e-mail:wild@cs.odu.edu].
Last updated: March 08, 1998.