0

Simple Operations

I don't know how? Today is a holiday at the children's camp, so all the children will be served ice cream. There are 68 children in the group, and each child should get 2 scoops of ice cream. Task Write a program to calculate and output the total number of ice cream scoops we need.

12th Jan 2022, 9:46 PM
Johnathan Matthew Royster
Johnathan Matthew Royster - avatar
2 Respuestas
+ 2
Please show your 👉code and 👉tag the relevant programming language
12th Jan 2022, 10:09 PM
Lisa
Lisa - avatar
0
I'm trying my hands on it in C: #include <stdio.h> #include <stdlib.h> int main() { int numOfChildren = 68, numOfScoops = 2, totalNumOfScoops = 0; totalNumOfScoops = numOfChildren * numOfScoops; printf("The total number of ice cream scoops we need is %d", totalNumOfScoops); return 0; } You can also create a function to execute the operation if you want. However, this is the simplest way I can think of.
13th Jan 2022, 2:03 AM
Jessy Baki