What would be the correct variable type in which to store the following information? a. Your age b. The area of your backyard c. The number of stars in the galaxy d. The average rainfall for the month of January |
|
|
|
|
|
|
1>Compiling... 1>main.cpp 1>c:\users\admin\documents\cpp\study\exercise 3-7\exercise 3-7\main.cpp(25) : warning C4076: 'unsigned' : can not be used with type 'float' 1>c:\users\admin\documents\cpp\study\exercise 3-7\exercise 3-7\main.cpp(25) : warning C4244: 'initializing' : conversion from 'double' to 'unsigned int', possible loss of data 1>c:\users\admin\documents\cpp\study\exercise 3-7\exercise 3-7\main.cpp(26) : warning C4076: 'unsigned' : can not be used with type 'double' 1>c:\users\admin\documents\cpp\study\exercise 3-7\exercise 3-7\main.cpp(26) : warning C4305: 'initializing' : truncation from '__int64' to 'unsigned int' 1>c:\users\admin\documents\cpp\study\exercise 3-7\exercise 3-7\main.cpp(26) : warning C4309: 'initializing' : truncation of constant value 1>c:\users\admin\documents\cpp\study\exercise 3-7\exercise 3-7\main.cpp(27) : warning C4244: 'initializing' : conversion from 'double' to 'unsigned short', possible loss of data 1>Linking... 1>Embedding manifest... 1>Build log was saved at "file://c:\Users\admin\Documents\CPP\Study\Exercise 3-7\Exercise 3-7\Debug\BuildLog.htm" 1>Exercise 3-7 - 0 error(s), 6 warning(s) ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== |
|
|
unsigned short int avgRainfallJanuary = 4.46;