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.
2 odpowiedzi
+ 2
Please show your
👉code and
👉tag the relevant programming language
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.