I did all my algorithms already but i need help on this one that is giving me problems.
Design an algorithm that prompts the user to enter the square footage of a house block and the square footage of a house that has been built on the block. The algorithm should then compute and display the mowing time required to cut the grass around the house, at the rate of two square meters per minute.
3 replies to this topic
#1
Posted 09 October 2010 - 05:57 PM
|
|
|
#2
Posted 09 October 2010 - 05:58 PM
the program being used is c++
#3
Posted 09 October 2010 - 07:20 PM
What part of it do you need help with? The statement of the problem seems a little vague to me.
#4
Posted 10 October 2010 - 01:03 AM
I think this is what you're asking.
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int bSqF;
int hSqF;
int mSqF;
double mPerMin;
double mowInM;
int answerMinutes;
mPerMin = 2*0.09290304;
cout << "Enter the block square footage: ";
cin >> bSqF;
cout << "\nEnter the house square footage: ";
cin >> hSqF;
mSqF = bSqF - hSqF;
mowInM = mSqF * 0.09290304;
answerMinutes = mowInM/mPerMin;
cout << "\nIt would take about " << answerMinutes << " minutes to mow the lawn";
return 0;
}
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









