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; }

12th Dec 2021, 2:32 PM
MD Rashedul Hasan MR
MD Rashedul Hasan MR - avatar
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.
12th Dec 2021, 2:41 PM
Ipang