Results 1 to 6 of 6

Thread: More problems from Aerials

Threaded View

  1. #1
    Aerials
    Guest

    Unhappy More problems from Aerials

    Once again, my code wont work lol
    so ca anyone help me? I dont know whats werong but the compiler acts weird

    Code:
    #include <iostream.h>
    #include <conio.h>
    
    int main()
    {
    char cont='c'
    int loop=0;
    for(loop=0;cont='c';loop++)
    {
    
    double length;
    double height;
    cout<<"This will calculate the area of a rectangle for you.\n"<<endl;
    cout<<"Enter the length of the rectangle: "<<endl;
    cin>>length;
    cout<<"Enter the height of the rectangle: "<<endl;
    cin>>height;
    cout<<"\n The area of the rectangle is: "<<(length*height)<<endl;
    
    cout<<"Press any key to exit"<<endl;
    }
    
    getch();
    getch();
    return 0;
    
    }
    Here's a screenshot of what the compiler says.

    Id appreciate the help
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width