Kodewick
Start learning →
Basic←→0 / 60

Share the cookies

#007BasicOutput3 min

17 cookies are shared out between 5 kids, everyone getting the same, and the rest are saved. Show two lines, Each kid: 3 and Left over: 2, working them out from cookies and kids.

Should show
Each kid: 3
Left over: 2
main.cpp
#include <iostream>
using namespace std;

int main() {
    int cookies = 17;
    int kids = 5;
    // your code here: show how many each kid gets and how many are left, one line each
    return 0;
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.