+ 1
I cant get through this code , tryed it many times can someone help
You are a cook in a restaurant. You need exactly 3 crabs to cook your special seafood dish named "Trio". Write a program that will take the number of crabs as input and output how many "Trio" dishes can be made. Sample Input 14 Sample Output 4
4 Answers
+ 3
Plz share your attempt.
0
//declare and assign variable totalCrabs
let totalCrabs = 14;
// calculate the number of dishes we can make
let nrDishes = (totalCrabs - (totalCrabs%3))/3;
//print to console the result
console.log(nrDishes);