anonymous
2012-02-10 21:59:11 UTC
//include statement(s)
//using namespace statement
int main ()
{
//variable declaration
//executable statements
//return statement
}
a. Write C++ statements that include the header files iostream and string.
b. Write a C++ statement that allows you to use cout, and endl without the prefix std::.
c. Write C++ statements that declare the following variables: name of type string and studyhours of type double.
d. Write C++ statements that prompt and input a string into name and a double value into studyhours.
e. Write a C++ statement that outputs the values of name and studyHours with the appropriate text. For example, if the value of name is “Donald” and the value of studyHours is 4.5, the output is:
Hello, Donald! On Saturday, you need to study 4.5 hours for the exam.
f. Compile and run your program.
_________________________________________________
The Code I have so far:
#include
#include
using namespace std;
int main() {
sting name;
double studyHours;
name = "Donald Smith";
studyHours = "4.5";
cout<<"Hello,"<< name << "! On Saturday you will need to study"<< studyHours << "for the exam."<< endl;
cin.get();
return();
}
_______________________________________
it is showing that there a problem where it say sting name