What would be the correct variable type in which to store the following information?
(a) Your height.
(b) The number of subjects in the BIT course.
(c) The average temperatue for the month of September
(d) Your partner's name.
(e) A status value corresponding to failure or success
Suggest a good variable name for each piece of information you described above, and
provide a sample
declaration/assignment statement for the variable (use correct C++ syntax).
1
Expert's answer
2011-10-11T07:57:54-0400
(a)& Your height. float my_height;
(b)& The number of subjects in the BIT course. int subnum;
(c)& The average temperature for the month of September double average_september_temperature;
(d)& Your partner's name. char name[50];
(e)& A status value corresponding to failure or success bool status;
Comments
Leave a comment