New to C++, need help with assignment

I am not being able to catch on with this assignment and have struggled to understand it. The question is asking:

You have 10 cows on your farm. You want to make sure each cow gets fed well, but not too much. Each cow should eat exactly 15 carrots. Get input from the user for the number of carrots delivered to the farm that day, then print out how many carrots are left over once the cows have been fed.

Example:
Input: 155
Output: 5


I know I am off, but this is what I have so far:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 #include <iostream>

using namespace std;

int main()
{
    cout << "Input: ";
    int carrots_eaten;
    cin >> carrots_eaten;
    
    const int total_carrots = 15;
    
    
    
     return 0;
}
Last edited on
forget leave c++... what would you do if this was your standard maths problem?
Topic archived. No new replies allowed.