Programming Language Sprng 2018 12 Define enumerated types and declare a variabl
ID: 3739747 • Letter: P
Question
Programming Language Sprng 2018 12 Define enumerated types and declare a variable called enum month which contains names from three primary colors (5 points) 13. Write a C++program that compare two string whether they are equal or not (10 points). 14. Explain what's const double pi 3.14159; and const char newline in'; in the code below (5 points) ainclude ciostream> using namespace std const double pi 3.14159, const char newline = Y nt main 0 double r-5.0 double circle, W radius circle 2.pi.r; coutExplanation / Answer
{
if((str1.compare(str2)) < 0)
cout << str1 << " is smaller than " << str2 << endl;
if((str1.compare(str2)) == 0)
cout << str1 << " is equal to " << str2 << endl;
else
cout << str1 << " is greater than " << str2 << endl;
}
14) 31.4159
Thanks, please let me know if there is any concern.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.