Answer to Question #178026 in C++ for Abdullah Ramzan

Question #178026

UCP need to design a new computer lab, each computer system is required 10 sq foot of space and the price of each system is 65,000. Write a C++ program to get the length and width of the room from user in foot and find the number of system required and its total cost.



1
Expert's answer
2021-04-03T09:46:50-0400
#include <iostream>
using namespace std;
int main(){
    int l, w, area;
    cout<<"Input the length of the room: ";
    cin>>l;
    cout<<"Input the width of the room: ";
    cin>>w;
    area = l * w;
    cout<<"The room can fit "<<area / 10<<" systems at a cost of "<<area / 10 * 65000;
    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