Write a C++ variable declaration for each of the following. Use int , double , o
ID: 3679486 • Letter: W
Question
Write a C++ variable declaration for each of the following. Use int , double , or string , and choose meaningful variable names
.Declare a variable to store a student ID number (1 to 1000).
Declare a variable to store the number of inches in a foot.
Declare a variable to store a temperature (0.0 to 130.0).
Declare a variable to store the name of the state you live in (VA)
.2. Declare and initialize variables to represent the following values. Use int , double , or string , and choose meaningful variable names.
Your hat size (7.5)
The number of days in a leap year
The name of your cat (Mindre)
Your cell phone number (999-999-9999)
Explanation / Answer
Please find the answers below :
1) int studentID;
2) double noOfInches;
3) double temperature;
4) string state;
5) double hatSize = 7.5;
6) int daysInLeapYear = 366;
7) string cat = "Midre";
8) string phone = "999-999-9999";
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.