Paint Bucket Calculator

#include <iostream>
 
int main()
{
    std::cout << "Enter the length of a wall in the room" << std::endl;
    float length;
    std::cin >> length;
    std::cout << "Enter the width of a wall in the room" << std::endl;
    float width;
    std::cin >> width;
    float height;
    std::cout << "Enter the height of a wall in the room" << std::endl;
    std::cin >> height;
    std::cout << "Enter the amount of area that a single paint bucket can cover" << std::endl;
    float areaCoveredByBucket;
    std::cin >> areaCoveredByBucket;
 
    float totalArea = (length * height * 2) + (width * height * 2);
    float totalBuckets = totalArea / areaCoveredByBucket;
    float bucketCost;
    std::cout << "Enter the cost of a single paint bucket" << std::endl;
    std::cin >> bucketCost;
    float totalCost = totalBuckets * bucketCost;
    std::cout << "The total amount of paint buckets needed to paint the room is " << totalBuckets << " which would cost $" << totalCost << "." << std::endl;
 
    return 0;
}
 

Volume and Surface Area of a Cone

#include <iostream>
#include <cmath>
 
int main()
{
    // volume and surface area of a cone
    // caleb b
    std::cout << "Enter the radius of the cone's base: ";
    double radius;
    std::cin >> radius;
 
    std::cout << "Enter the height of the cone: ";
    double height;
    std::cin >> height;
 
    double volume = 3.14 * radius * radius * height / 3; 
    std::cout << "The volume of the cone is " << volume << std::endl;
    double surfaceArea = 3.14 * radius * (radius + sqrt(height * height + radius * radius));
    std::cout << "The surface area of the cone is " << surfaceArea << std::endl;
    return 0;
}