Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m still getting few compiler errors for this program: #include<iostream> usin

ID: 3617536 • Letter: I

Question

I'm still getting few compiler errors for this program:
#include<iostream>
using namespace std;

void PrintPurpose();
void PrintResults( int, int, int);
void GetRoomDimension(int&, int&, int&, int&);
int ComputeNumberOfTiles(int, int,int, int, int);
int GetNumberOfRoom();
int GetTilesSize();

int main()
{
   
    PrintPurpose();
   
    int count,rooms,tileSize, wFt, wIn, lFt, lIn,TotTiles, roomTiles,numBoxes;
    int boxes,extra;
        count=0;
        rooms= GetNumberOfRoom();
        while(count< rooms)
        {
        GetRoomDimension(wFt,wIn, lFt, lIn);
        tileSize=GetTilesSize();
        roomTiles=ComputeNumberOfTiles(wFt, wIn, lFt, lIn, tileSize);
       
        TotTiles+=roomTiles;
       
        cout<< "Roomrequires "<< roomTiles <<endl;
        count++;
       
        }
       
        numBoxes= TotTiles/20;
        extra= TotTiles%20;
        if(extra!=0)
           numBoxes++;
           PrintResults(TotTiles,numBoxes,extra);
            return0;
       
       
   
void PrintResults(int TotTiles, int numBoxes, int extra)
    {
        cout<<"Total tilesrequired is:"<< TotTiles<<endl;
        cout<<"Number of boxesneeded is:"<<numBoxes <<endl;
        cout<<"There will be"<<extra<<" extra tiles. ";
       
    }
    void PrintPurpose()
    {
        cout<<"This programcomputes the number of tiles, the number of boxes of tile for ajob"<<endl;
    }
   
    int ComputeNumberOfTiles(int widthft,intwidthin, int lengthft, int lengthin, int tileSize)
    {
        int length, width,roomarea,need,tilearea;
        double needed;
        length= lengthft*12+lengthin;
        width= widthft*12 +widthin;
        roomarea= length*width;
       
        tilearea=tileSize*tileSize;
       
        need= roomarea/tilearea;
        needed=(double)roomarea/tilearea;
       
        if(need!= needed)
       
        need++;
        return need;
    }
   
    void GetRoomDimension(int& wft, int&win, int& lft,int& lin)
    {
        cout<<"Enter roomwidth(feet and inches, separated be a space):";
        cin>>wift>>win;
       
        if(wft<= 0|| win< 0||win>12)
        {
           cout<<"Invalid entry ";
           cout<<"Enter room width(feet and inches, separated be aspace):";
           cin>>wft>>win;
        }
       
            cout<<"Enter room lengh(feet and inches, separated by aspace):";
           cin>> lft>>lin;
           
        if(lft<=0|| lin<0||lin>12)
        {
          cout<<"Invalid entry ";
          cout<<"Enter room lengh(feet and inches, separated by aspace):";
           cin>>lft>>lin;
       }
  
  
   int GetNumberOfRoom()
   {int rooms;
  
   cout<<"Enter number of rooms:";
   cin>>rooms;
  
   while(rooms<=0)
   {
       cout<<"Invalid entry must be> 0 ";
       cout<<"Enter number ofrooms:";
       cin>>rooms;
}
return rooms;
}
    int GetTilesSize()
    {int tile;
   
    cout<<"Enter size of tile in inches:";
    cin>>tile;
   
    while(tile<=0)
    {
        cout<<"Invalid entrymust be > 0 ";
        cout<<"Enter size oftile:";
        cin>>tile;
    }
    return tile;         
              

}   

Explanation / Answer

Hereis the running code, there was no big mistake you did, just forgetto close some methods brackets, and give one wrong variablename. Please Rate:) #include using namespace std; void PrintPurpose(); void PrintResults( int, int, int); void GetRoomDimension(int&, int&, int&, int&); int ComputeNumberOfTiles(int, int,int, int, int); int GetNumberOfRoom(); int GetTilesSize(); int main() {     PrintPurpose();     int count,rooms,tileSize, wFt, wIn, lFt, lIn,TotTiles, roomTiles,numBoxes;     int boxes,extra;         count=0;         rooms=GetNumberOfRoom();         while(count