was just wondering if this would work. thanks. and im pretty sure that I messed up the bool part thx.
I did run it, it said “return true” and “return false” was a problem.
#include <iostream>
int room_width {0};
int room_length {0};
void data()
{
// room width
std::cout << "Enter the WIDTH of the room -- ";
std::cin >> room_width;
std::cout << std::endl;
// room length
std::cout << "Enter the LENGTH of the room -- ";
std::cin >> room_length;
std::cout << std::endl;
// math
std::cout << "The area of the room is " << room_length * room_width << " square feet" << std::endl;
}
bool room_math()
{
// makeing room length times room width equal room square feet
int room_square_feet {room_length * room_width};
// makeing shure that length times room width equal room square feet
if (room_square_feet == room_length * room_width)
{
return true
}
else
{
return false
}
}
int main()
{
data();
room_math();
return 0;
}