Intro to CS 1 C++ CodeLab Complete Question & Answers
internet advertising
Monday, June 18, 2012
Homework 4: Constants
1. Declare an int constant, MonthsInYear , whose value is 12 .
const int MonthsInYear = 12 ;
2. Declare an int constant MonthsInDecade whose value is the value of the constant MonthsInYear (already declared) multiplied by 10 .
const int MonthsInDecade = MonthsInYear * 10 ;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment