Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input){
- let type = input[0];
- let gender = input[1];
- let live = 0;
- switch(gender){
- case "m":
- if (type == "British Shorthair"){
- live = live = (13 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Siamese"){
- live = (15 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Persian"){
- live =(14 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Ragdoll"){
- live = (16 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "American Shorthair"){
- live = (12 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Siberian"){
- live = (11 * 12) / 6;
- console.log(`${live} cat months`)
- }else{
- console.log(`${type} is invalid cat!`)
- }
- break;
- case "f":
- if (type == "British Shorthair"){
- live = live = (14 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Siamese"){
- live = (16 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Persian"){
- live =(15 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Ragdoll"){
- live = (17 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "American Shorthair"){
- live = (13 * 12) / 6;
- console.log(`${live} cat months`)
- } else if (type == "Siberian"){
- live = (12 * 12) / 6;
- console.log(`${live} cat months`)
- }else{
- console.log(`${type} is invalid cat!`)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement