0
What is the problem with this ?? It was in my book. I don't know why it's not working.
#include <iostream.h> typedef unsigned short int USHORT; int main() { USHORT Width=5; USHORT Length; Length=10; USHORT Area=Width*Length; cout<<"width:"<<Width<<"\n", cout<<"Length:"<<Length<<endl, cout<<"Area:"<<Area<<endl, return 0; }
2 Antworten
+ 7
Use
#include <iostream>
Not
#include <iostream.h>
The latter is deprecated, and won't likely to work in modern C++ compilers.
Add this before main() function
using std::cout, std::endl;
And replace the comma at the end of line printing <Area> with a semicolon.