locked
IT AT MICROSOFT RRS feed

  • Question


  • #include

    <iostream>


    using

    std::cout;


    using

    std::cin;


    using

    std::endl;



    int

    main()

    {

    doubleheight{}, width{}, length{};

    doubleperimeter{};

    constdoublerollWidth{ 21.0 };

    constdoublerollLength{ 12.0*33.0 };

    intstrips_per_roll{};

    intstrips_reqd{};

    intnrolls{};

    endl;

    cout << endl

    <<

    "Enter the Height of the room in inches: ";

    cin >> height;

    cout << endl

    <<

    "Now enter the length and width in inches: ";

    cin >> length >> width;

    strips_per_roll = rollLength / height;

    perimeter = 2.0*(length + width);

    strips_reqd = perimeter / rollWidth;

    nrolls = strips_reqd / strips_per_roll;

    cout << endl

    <<

    "For your room you need "<< nrolls << " rolls of wallpaper.";

         << endl;

    return0;

    }

    THIS PROGRAM RUNS THROUGH ALL STOPS AND DOES NOT PERFORM ANY CALCULATIONS AS IT IS SUPPOSED TO----IT JUST GETS TO PRESS ENTER TO EXIT-----WHAT IS WRONG?  (VISUAL STUDIO C++ 2014   F.BACSKAY@COX.NET PLEASE RESPOND AT MY E MAIL SHOWN ABOVE--------------------

    Tuesday, September 23, 2014 7:41 PM