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.
#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;
}
Comments
Leave a comment