Answer to Question #264139 in C++ for mno

Question #264139

You are required to build a program for ABC Builders, they have various models of houses which are all build on 1 canal area, the three models with costs are  

House Models Building Cost Double Story House 10000000 House with basement 20000000 Single Story 5000000 

 

The property dealer give them the latest prices for area their house covers and the construction price building each model. The price of area is 1 crore, Calculate the total cost of whole house after construction. Suppose you have two users for this program, take input from them and based on their inputs calculate the total cost for their choice of house. 


1
Expert's answer
2021-11-11T00:06:25-0500
#include <iostream>


using namespace std;


int main()
{
    int c;
    cout<<"\nChoose a house model:\n";
    cout<<"\n1. Double Story House\n2. House with basement\n3. Single Story\n";
    cin>>c;
    long price=0;
    
    if (c==0){
        price=10000000;
    }
    else if(c==2){
        price=2000000;
    }
    else if(c==3){
        price=5000000;
    }
    
    cout<<"\nTotal Price = "<<price;
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS