fork download
  1. Area overloded
  2.  
  3. #include<iostream.h>
  4. #include<conio.h>
  5. #define phi 3.14
  6. int area(int,int);
  7. float area(int);
  8. void main()
  9. {
  10. int a,b,c,cho;
  11. clrscr();
  12. cout<<"\t What do you want to do?\n";
  13. cout<<"1. area of rectangle"<<endl;
  14. cout<<"2. area of circle"<<endl;
  15. cout<<"Choice:";
  16. cin>>cho;
  17. switch(cho)
  18. {
  19. case 1:
  20. cout<<"Enter lengt and breath (with white space):";
  21. cin>>a>>b;
  22. cout<<"Area of RECTANGLE:"<<area(a,b);
  23. break;
  24. case 2:
  25. cout<<"Enter radius:";
  26. cin>>c;
  27. cout<<"Area of CIRCLE:"<<area(c);
  28. break;
  29. }
  30. getch();
  31. }
  32. int area(int x,int y)
  33. {
  34. return (x*y);
  35. }
  36. float area(int s)
  37. {
  38. return (phi*s*s);
  39. }
  40.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:21: fatal error: iostream.h: No such file or directory
 #include<iostream.h>
                     ^
compilation terminated.
stdout
Standard output is empty